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
Click For Summary

Homework Help Overview

The discussion revolves around solving a first-order ordinary differential equation (ODE) given by (2xy-5)dx+(x^2+y^2)dy=0 with the initial condition y(3)=1, using Mathematica software.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the use of the DSolve command in Mathematica, with some attempting to rearrange the equation into a standard form. Questions arise regarding the input of initial conditions and the handling of multiple solutions.

Discussion Status

Some participants have provided guidance on how to input the ODE and initial conditions into Mathematica. There is an exploration of the software's response to different forms of the equation, with acknowledgment of the challenges in obtaining a solution with the specified initial condition.

Contextual Notes

Participants note that Mathematica may not solve the ODE analytically and mention the potential use of direction fields as an alternative approach. There is also a reference to the Math&Science Software section for additional syntax questions.

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.

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

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

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

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.
 

Similar threads

Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 20 ·
Replies
20
Views
2K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
Replies
22
Views
2K