Mathematica Disagrees with ME

  • Thread starter pat666
  • Start date
  • #1
709
0
Mathematica Disagrees with ME!!!!!!!!!!

Homework Statement


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


Homework Equations





The Attempt at a Solution


Ive solved this by hand and now where required to get Mathematica to solve to.
My solution: [tex] -17/3=x^2y-5x+y^3/3 [/tex]
I've attached what mathematica has done. Now the question
Am I wrong ?
Is my code wrong?
Is mathematica wrong?

Thanks

P.S I rearranged to this form to sick in mathematica:
dy/dx=(-2xy+5)/(x^2+y^2)
 

Attachments

  • mathematica.png
    mathematica.png
    47.3 KB · Views: 394

Answers and Replies

  • #2
35,028
6,774


Your thumbnail is too small for me to be able to read. In any case, your work is correct. You can verify it by doing two things:
1) Checking that the initial condition is satisfied; i.e., that when x = 3 and y = 1, then x2y - 5x + y3/3 = -17/3 is a true statement.
2) Differentiating the equation x2y - 5x + y3/3 = -17/3 implicitly to arrive at the differential equation dy/dx = (5 - 2xy)/(x2 + y2).

Checking a solution to a differential equation is something you should do as a matter of course. You've already done all the hard work. It's only a little more work to verify that your work is correct.
 
  • #3
709
0


good to know that I did it right by hand, do you know the correct mathematica code so that it will do it.

Thanks
 
  • #5
lurflurf
Homework Helper
2,440
138


That mathematica output looks correct. The cubic in y has been factored, what kind of output were you expecting?
 
  • #6
709
0


one the same as mine---- is that not possible here?
 
  • #7
I like Serena
Homework Helper
6,577
176


Homework Statement


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


Homework Equations





The Attempt at a Solution


Ive solved this by hand and now where required to get Mathematica to solve to.
My solution: [tex] -17/3=x^2y-5x+y^3/3 [/tex]
I've attached what mathematica has done. Now the question
Am I wrong ?
Is my code wrong?
Is mathematica wrong?

Thanks

P.S I rearranged to this form to sick in mathematica:
dy/dx=(-2xy+5)/(x^2+y^2)

Mathematica did a little more work than you did.

What you have is a third order equation of y.
Mathematica solved it to be of the form y = f(x).
I haven't checked it, but it looks about right: 1 real solution and 2 imaginary ones.
Presumably you can rewrite the first solution to match your solution.

I'm not a Mathematica specialist, but I suspect it is not equipped to output the kind of solution you gave.
 
  • #9
SteamKing
Staff Emeritus
Science Advisor
Homework Helper
12,796
1,670


pat666: your solution from sec. 3 of the OP does not satisfy the initial condition y(3)=1
 
  • #10
SteamKing
Staff Emeritus
Science Advisor
Homework Helper
12,796
1,670


pat666: Delete previous post. The initial condition is satisfied.
 
  • #11
1,069
29


At least with the version of Mathematica I'm using, I believe it returns exactly the same result with or without the initial condition y(3)=1, containing an arbitrary constant denoted by C[1] by Mathematica. That is odd. If I'm not mistaken then usually with a first order differential equation and a single initial condition it is sufficient to eliminate the arbitrary constants. And I've never seen another differential equation behave like this when given to DSolve, but I obviously haven't seen everything DSolve can do. As others have pointed out, you found an implicit solution for y(x) where Mathematica factored the cubic to find three explicit solutions. Two of those when I attempt to solve for C[1] using your initial condition have no solution. The third does does satisfy your differential equation and your initial condition, so it isn't clear why Mathematica didn't return only that solution with arbitrary constant solved for. If I experiment with changing your initial condition I can provoke error messages in some cases and get it to return a single solution with no arbitrary constant in some others. I don't know what it is about your example that makes it do this. And I have no answer for your final question, how to turn an explicit solution into the implicit form that you found by hand.
 

Related Threads on Mathematica Disagrees with ME

  • Last Post
Replies
1
Views
2K
Replies
1
Views
2K
Replies
8
Views
1K
Replies
7
Views
5K
  • Last Post
Replies
7
Views
861
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
1
Views
1K
Top