Solve ODEs in Mathematica w/ (2xy-5)dx+(x^2+y^2)dy=0 and y(3)=1

  • Thread starter Thread starter pat666
  • Start date Start date
  • Tags Tags
    Mathematica Ode
pat666
Messages
703
Reaction score
0

Homework Statement



I have solved this by hand but we are also required to get Mathematica to spit out a solution and I need some help.

(2xy-5)dx+(x^2+y^2)dy=0 , y(3)=1

Homework Equations





The Attempt at a Solution


I know the command is DSolve but I don't know how to put in dx or dy. Also I know that Mathematica may not be able to solve this analytically and in that case we use direction fields but I also need some help with that.

Hope someone here knows Mathematica!

Thanks
 
Physics news on Phys.org
I guess you could rearrange to get

\frac{5 - 2xy(x)}{x^2+y(x)^2} = \frac{dy}{dx} = y'(x),​

and see if Mathematica accepts that as a valid ODE.
 
Hey, It gave me about 5 unique solutions, do you know how to put in initial conditions?

Thanks
 
To add initial conditions you use a list in {} with things like y[3]==1 or y'[0]==1:

DSolve[{y'[x] == -(2 x y[x] - 5)/(x^2 + y[x]^2), y[3] == 1}, y, x]

Note: The Math&Science Software section usually has most of the software syntax questions.
 
Hey Bill, thanks for the reply. I put that in Mathematica and it doesn't do anything??
 
This without initial conditions
DSolve[{y'[x] == -(2 x y[x] - 5)/(x^2 + y[x]^2)}, y, x]
gives me 3 solutions with being an C[1] an arbitrary constant.
This with your initial condition
DSolve[{y'[x] == -(2 x y[x] - 5)/(x^2 + y[x]^2), y[3] == 1}, y, x]
seems to stun it.
Perhaps you could take each solution and solve for C[1] given your initial condition.
Can you figure out how to do that?
 
I can just rewrite 1 and solve I gues, I'm playing with "vectorplot" at the moment to see if I can plot the specific solution.
 
Back
Top