# Thread: Can't find my mistake in dif equation

1. ## Can't find my mistake in dif equation

I am trying to solve this equation for 2 days and I can't do it.... I solved it but wolfram alpha gives different answers. Please help me to find my mistake
- this is my solution. $y = c_1x^3-\dfrac{1}{2x}+c_2$ - Wolfram alpha answer

2. ## Re: Can't find my mistake in dif equation

in wolfram alpha input u have given rhs as -2/x^3 while in ur soln u have computed for -2/x^2

3. ## Re: Can't find my mistake in dif equation

$xy''-y'=-\dfrac{2}{x^2}$

The integrating factor is $\dfrac{1}{x^3}$, so multiply both sides by that:

$\dfrac{1}{x^2}y'' - \dfrac{1}{x^3}y' = -\dfrac{2}{x^5}$

$\left(\dfrac{y'}{x^2}\right)^\prime = -\dfrac{2}{x^5}$

Integrating both sides:

$\dfrac{y'}{x^2} = -\int \dfrac{2}{x^5}dx = \dfrac{1}{2x^4}+C_1$

Multiply both sides by $x^2$:

$y' = \dfrac{1}{2x^2}+C_1x^2$

Integrate both sides:

$y = -\dfrac{1}{2x}+\dfrac{C_1x^3}{3}+C_2$

Fold the $\dfrac{C_1}{3}$ into a single constant:

$y = c_1x^3-\dfrac{1}{2x}+c_2$

When you entered the problem into WolframAlpha, you entered $xy''-2y' = -2/x^3$. Notice the RHS of that differential equation has $x^3$ in the denominator. Your original problem has $x^2$ in the denominator.

4. ## Re: Can't find my mistake in dif equation

You are correct that the general solution to the associated homogeneous equation is $y= C_1x^3+ C_2$ but you are doing the "variation of parameters" incorrectly.

Yes, we look for a solution to the entire equation of the form $y= C_1(x)x^3+ C_2(x)$, allowing the "parameters", $C_1$ and $C_2$ to "vary".

Then we have $y'= C_1'x^3+ 3C_1x^2+ C_2'$. We simplify the equation (there are many different possible functions for $C_1$ and $C_2$) by requiring that $C_1'x^3+ C_2'= 0$ leaving $y'= 3C_1x^2$. Differentiating again, $y''= 3C_1'x^2+ 6C_1x$ and now the differential equation becomes $xy''- 2y'= 3C_1'x^3+ 6C_1x^2- 6C_1x^2= 3C_1'x^3= -\frac{2}{x^2}$.

There is your error- you have, although you don't say how you arrived at it, $x^2$ on the left rather than $x^3$.

5. ## Re: Can't find my mistake in dif equation

Can you explaint this part? And why you wrote y' instead of 2y' and got right answer?

$\dfrac{1}{x^2}y'' - \dfrac{1}{x^3}y' = -\dfrac{2}{x^5}$

$\left(\dfrac{y'}{x^2}\right)^\prime = -\dfrac{2}{x^5}$

6. ## Re: Can't find my mistake in dif equation

Sorry I can't understand integrating factor method, can you say where is error in my solution? ;/

7. ## Re: Can't find my mistake in dif equation

Originally Posted by darjiaus7
Can you explaint this part? And why you wrote y' instead of 2y' and got right answer?

$\dfrac{1}{x^2}y'' - \dfrac{1}{x^3}y' = -\dfrac{2}{x^5}$

$\left(\dfrac{y'}{x^2}\right)^\prime = -\dfrac{2}{x^5}$
HallsofIvy explained the error with your solution. But, you are correct that I wrote the problem incorrectly. Check post #4 above for HallsofIvy's explanation of where you went wrong.

8. ## Re: Can't find my mistake in dif equation

Ok forget about my solution Now can you explain how $\dfrac{1}{x^2}y'' - \dfrac{1}{x^3}y'$ became $\left(\dfrac{y'}{x^2}\right)^\prime$

9. ## Re: Can't find my mistake in dif equation

this is easy use product rule of differentiation d(fg)=fd(g)+gd(f)
here f=1/(x^2) and g=y'