Cant Solve ODE with dsolve

조회 수: 35 (최근 30일)
Walter  Parker
Walter Parker 2020년 5월 14일
댓글: Bjorn Gustavsson 2020년 5월 21일
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))

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2020년 5월 14일
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
Walter  Parker
Walter Parker 2020년 5월 21일
Thank you so much for your help. I was finally able to complete my project due to your input.
Bjorn Gustavsson
Bjorn Gustavsson 2020년 5월 21일
My pleasure.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2020년 5월 14일
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.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by