how to solve this second order deferential equation with constants symbols
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
0 votes

Hi, i am struggling to solve this equation. please help me to code this on matlab or any other method to solve this . thanks
Accepted Answer
Walter Roberson
on 14 May 2017
syms theta(t) theta0 dtheta0
Dtheta = diff(theta); D2theta = diff(Dtheta);
dsolve([I*D2theta == K1*Dtheta - K2*Dtheta^2, theta(0)==theta0,Dtheta(0)==dtheta0])
ans =
(I*log(-(exp(-(K1*K2*(C34 - t/K2))/I) - (I*log(-exp(-(K2*theta0)/I)/(K2*dtheta0)))/(K1*K2))/K1))/K2
However, this answer does not seem to be correct: it involves the arbitrary constant C34 without good reason.
9 Comments
Dan Mathotaarchchi
on 15 May 2017
Edited: Dan Mathotaarchchi
on 15 May 2017
thank you . will there be any method to define c34? however when i try to solve it this appears. ''??? Error using ==> syms at 61'' in this problem , K1,K2,I are positive. and t and theta also positive. t vs theta to be graphed too. highly appreciated your answer many thanks
Torsten
on 15 May 2017
Walter Roberson
on 15 May 2017
Yes... the problem is that MATLAB is getting the wrong solution.
I suggest using "Copy and Paste" :-)
Best wishes
Torsten.
By the way, you get the same incorrect solution for
dsolve('I_*D2y = K1*Dy - K2*(Dy)^2', 'y(0)=y0', 'Dy(0)=dy0')
Note that I had to substitute I_ for I: in this particular context, I by itself would be interpreted as sqrt(-1)
Walter Roberson
on 16 May 2017
I just submitted a bug report about this.
Walter Roberson
on 16 May 2017
I just submitted a bug report about this.
Dan Mathotaarchchi
on 23 May 2017
thank you Torson but the link seems not working
Dan Mathotaarchchi
on 23 May 2017
thank you Walter
More Answers (0)
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
See Also
on 14 May 2017
on 23 May 2017
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)