How can i solve a this complex differential equation using ode45?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Good morning.
For my training, i would like to solve this differential equation:
(K1*y')^2 + [K1+(K1^2/K2)]*y' - 1 =0
where K1 = sin(y)/[(1+cos(y))*(2-cos(y))]
K2 = 0.31498*cos(y)*sin(y)/[((1+cos(y))^4/3)*((2-cos(y))^5/3)]
I have already tried to solve it with ode45, but as you see, K1 and K2 are funtions of y and the power 2 complicates the equation.
I have 2 weeks to finish it. Please help me by giving me advices.
Thank you
DIALLO
0 commentaires
Réponses (1)
Star Strider
le 4 Nov 2012
Interesting problem. I suggest you start by considering it a quadratic expression of y', then solving it as a system of two differential equations in y'. Starting with the Symbolic Math Toolbox:
syms K1 K2 dy
yprime = solve( (K1*dy)^2 + [K1+(K1^2/K2)]*dy - 1 == 0, dy )
yields:
yprime =
-(K1 + K2 + (K1^2 + 2*K1*K2 + 5*K2^2)^(1/2))/(2*K1*K2)
-(K1 + K2 - (K1^2 + 2*K1*K2 + 5*K2^2)^(1/2))/(2*K1*K2)
Now you have a system of two first-order differential equations. When I solved it with ode45 with initial conditions of [1 1], I got two curves asymptotic at about ±1.57.
0 commentaires
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!