Is this the correct solution to this DiffEq?

  • Thread starter vanceEE
  • Start date
  • Tags
    Diffeq
In summary, a differential equation is a mathematical equation that relates a function to its derivatives and is commonly used in various fields to model physical phenomena. A solution to a differential equation is considered "correct" if it satisfies the equation and any initial or boundary conditions given. To check if a given solution is correct, it can be substituted into the equation and checked for satisfaction of the equation and any conditions. A differential equation can have an infinite number of solutions, but for a specific set of conditions, there may be only one unique solution. There are various software tools available, such as Wolfram Alpha, MATLAB, and Python libraries, that can help find the correct solution to a differential equation using numerical and analytical methods.
  • #1
vanceEE
109
2
$$ xy' = y + xy^2 $$
$$ xy' - y = xy^2 $$
$$ y' + (-1/x)y = y^2 $$
$$ e^{∫(-1/x)dx} = 1/x $$
$$ (1/x)[y' + (-1/x)y = y^2] $$
$$ (1/x)y' - (1/x^2)y = (1/x)y^2 $$
$$ ∫((1/x)y)' = ∫((1/x)y^2) dx $$
$$ (1/x)y = (y^2)ln|x| + C $$
$$ y = (xy^2)ln|x|+Cx $$

Wolfram shows me another solution...
$$y = \frac{-2x}{C+x^2}$$
Are both correct?
 
Physics news on Phys.org
  • #2
vanceEE said:
$$ xy' = y + xy^2 $$
$$ xy' - y = xy^2 $$
$$ y' + (-1/x)y = y^2 $$
$$ e^{∫(-1/x)dx} = 1/x $$
$$ (1/x)[y' + (-1/x)y = y^2] $$
$$ (1/x)y' - (1/x^2)y = (1/x)y^2 $$
$$ ∫((1/x)y)' = ∫((1/x)y^2) dx $$
$$ (1/x)y = (y^2)ln|x| + C $$
$$ y = (xy^2)ln|x|+Cx $$
I don't see anything wrong in what you did.
vanceEE said:
Wolfram shows me another solution...
$$y = \frac{-2x}{C+x^2}$$
Are both correct?
It's easy enough to check. Differentiate your solution implicitly and verify that it satisfies the differential equation.
 
  • #3
When you say [tex] ∫((1/x)y^2) dx = (y^2)ln|x| + C[/tex] you are assuming that ##y## is constant with respect to ##x##, contrary to the assumption of the problem that ##y## is a function of ##x##.

If memory serves, the method of multiplying by an integrating factor in the manner that you have done works for first-order linear differential equations; ones that can be written in the form ##y'+f(x)y=g(x)##. The existence of a ##y^2## term means that this DE is not linear. So integrating factors may not be the way to go.
 
  • #4
gopher_p said:
this DE is not linear.

gopher_p, you're correct, is this is nonlinear, so my method was incorrect. I needed to solve by substitution, see below:

$$xy' = xy^{2} + y $$
$$xy' - y = xy^{2} $$
$$ \frac{xy'}{xy^2} - \frac{y}{xy^2} = 1 $$
$$ \frac{y'}{y^2} - \frac{1}{xy} = 1 $$
if $$ z = \frac{1}{y} $$.. and $$ z' = \frac{-1}{y^2} \frac{dy}{dx} $$
then..
$$ \frac{y'}{y^2} - \frac{1}{xy} = z' + \frac{1}{x}z $$
this is now a linear equation..
$$ z' + \frac{1}{x}z = -1 $$
$$ e^{∫\frac{1}{x}} = x $$
$$ ∫[x*z]' = ∫ -x dx $$
$$ xz = -\frac{x^2}{2} + C $$
$$ z = -\frac{x^2 + 2C}{2x} $$
$$ \frac{1}{y} = -\frac{x^2+ 2C}{2x} $$
$$ y = -\frac{2x}{x^2 + D} $$ where D = 2C
 
Last edited:
  • #5
Looks good. Nice work.
 

1. What is a differential equation?

A differential equation is a mathematical equation that relates a function to its derivatives. It is commonly used to model various physical phenomena in fields such as physics, engineering, and economics.

2. What makes a solution to a differential equation "correct"?

A solution to a differential equation is considered "correct" if it satisfies the equation and any initial or boundary conditions given. This means that when the solution is substituted back into the equation, it makes the equation true.

3. How can I check if a given solution is correct for a differential equation?

To check if a given solution is correct for a differential equation, you can substitute the solution into the equation and see if it satisfies the equation. You can also check if the solution satisfies any initial or boundary conditions given.

4. Can a differential equation have more than one possible solution?

Yes, a differential equation can have an infinite number of solutions. However, for a specific set of initial or boundary conditions, there may be only one unique solution that satisfies the equation.

5. Are there any software tools that can help me find the correct solution to a DiffEq?

Yes, there are many software tools available that can help you find the correct solution to a differential equation. Some popular ones include Wolfram Alpha, MATLAB, and Python libraries such as SciPy and SymPy. These tools use numerical and analytical methods to solve differential equations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
548
  • Calculus and Beyond Homework Help
Replies
2
Views
544
  • Calculus and Beyond Homework Help
Replies
14
Views
247
  • Calculus and Beyond Homework Help
Replies
1
Views
493
  • Calculus and Beyond Homework Help
Replies
5
Views
288
  • Calculus and Beyond Homework Help
Replies
25
Views
348
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
693
  • Calculus and Beyond Homework Help
Replies
5
Views
620
  • Calculus and Beyond Homework Help
Replies
5
Views
545
Back
Top