I got it. I failed to simplify my solution in terms of y. The hand calculation and MATLAB output is the same.
How can I input the syntax of this Differential Equation (2*x + y^2 + 2*x*y*y' = 0)?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. How can I input the syntax of this Differential Equation (2*x + y^2 + 2*x*y*y' = 0) in MATLAB? Using hand calculation with Exact Equation Method the answer is x^2+x*y^2 = C. I used this syntax, ode = diff(y,x) == (-2*x-y^2)/(2*x*y) but got different solution which was (-x*(x^2 + C1))^(1/2)/x -(-x*(x^2 + C1))^(1/2)/x .
Note that I followed the example problem (dydt+y)^2 = 1 in https://au.mathworks.com/help/symbolic/solve-a-single-differential-equation.html#d118e24819 help documentation.
Thanks.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!