Cant Solve ODE with dsolve

14 visualizaciones (últimos 30 días)
Walter  Parker
Walter Parker el 14 de Mayo de 2020
Comentada: Bjorn Gustavsson el 21 de Mayo de 2020
I am having issues solving this Differential Equation using dsolve
DEQ:
dT/dt = (A1*exp(1i*(w*t+phi))+A1)*(B1*exp(1i*w*t)-T(t))
CODE:
A1 = 7.9443e-5;
B1 = 10;
w = 7.3e-5;
phi = 0;
syms T(t)
ode = diff(T) == (A1*exp(1i*(w*t+phi))+A1)*(B1*exp(1i*w*t)-T);
cond = T(0) == 10;
TSol(t) = dsolve(ode,cond);
%The solution comes out to be:
TSol = exp(-(5861854777884531*dt)/73786976294838206464 + ...
(exp((dt*5386449269523189i)/73786976294838206464)*1953951592628177i)/1795483089841063) * ...
int((29309273889422655*exp(x*(5861854777884531/73786976294838206464 + ...
16159347808569567i/147573952589676412928) - ...
(exp((x*5386449269523189i)/73786976294838206464)*1953951592628177i)/1795483089841063) * ...
cos((5386449269523189*x)/147573952589676412928))/18446744073709551616, ...
x, 0, t, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true) + ...
10*exp(- (5861854777884531*t)/73786976294838206464 + ...
(exp((t*5386449269523189i)/73786976294838206464)*1953951592628177i)/1795483089841063) * ...
exp(-1953951592628177i/1795483089841063)
I dont understand what this portion of the solution or the rest of it means.
int((29309273889422655*exp(x*(5861854777884531/73786976294838206464 + 16159347808569567i/147573952589676412928) - (exp((x*5386449269523189i)/73786976294838206464)*1953951592628177i)/1795483089841063)*cos((5386449269523189*x)/147573952589676412928))/18446744073709551616, x, 0, t, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)
Is it possible for someone to explain why I get (x, 0, t, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true) in my solution and how do I fix it to get a proper analytical solution. I am running MATLAB R2019a.
I solved a similar differential equation seen below and this work using dsolve so I am not sure why my current DEQ doesn't work:
DEQ: dT/dt = (A1*exp(1i*(w*t+phi)))*(B1*exp(1i*w*t)-T(t))

Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 14 de Mayo de 2020
So you have a linear first-order differential equation looking something like this:
Then I'd suggest that special cases are combinations of A1 B1 and w equals zero. If I run your code without the numerical values of A1 B1 phi and w I get:
TSol = dsolve(diff(T) == (A1*exp(1i*(w*t+phi))+A1)*(B1*exp(1i*w*t)-T),cond)
TSol =
10*exp(-(A1*exp(phi*1i)*1i)/w)*exp(- A1*t + (A1*exp(phi*1i)*exp(t*w*1i)*1i)/w) + exp(- A1*t + (A1*exp(phi*1i)*exp(t*w*1i)*1i)/w)*int(A1*B1*exp(A1*u + u*w*1i - (A1*exp(phi*1i)*exp(u*w*1i)*1i)/w)*(exp(phi*1i + u*w*1i) + 1), u, 0, t, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)
>> pretty(TSol)
t
/
/ A1 #3 1i \ | / A1 #3 exp(#1) 1i \
exp| - -------- | #2 10 + #2 | A1 B1 exp| A1 u + #1 - ---------------- | (exp(phi 1i + #1) + 1) du
\ w / / \ w /
0
where
#1 == u w 1i
/ A1 #3 exp(t w 1i) 1i \
#2 == exp| - A1 t + -------------------- |
\ w /
#3 == exp(phi 1i)
It is a long expression, but it containe nothing extraordinarily complicated, but if for example w is zero this falls appart. You should be able to convert this into a regular m-function in a couple of minutes. It seems to fit the ode rather nicely.
HTH
  4 comentarios
Walter  Parker
Walter Parker el 21 de Mayo de 2020
Thank you so much for your help. I was finally able to complete my project due to your input.
Bjorn Gustavsson
Bjorn Gustavsson el 21 de Mayo de 2020
My pleasure.

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 14 de Mayo de 2020
There does not appear to be an analytic solution to that. I checked with Maple.
Two functions that look very similar can turn out to have very different properties.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by