# help with a problem

• Jan 29th 2011, 01:03 PM
Jeonsah
help with a problem
Hey guys, i just started a new course in differential equations and im kinda having a hard time. Heres one of the problems I am having difficulty with:

Verify that the piecewise-defined function

$y=\left\{\begin{array}{cc}-x^2,&\mbox{ if }
x < 0\\x^2, & \mbox{ if } x\geq 0\end{array}\right.$

is a solution of the differential equations $xy'-2y = 0$ on $(-\infty , \infty)$

Thanks!
• Jan 29th 2011, 01:07 PM
Ackbeet
What have you tried so far?
• Jan 29th 2011, 01:12 PM
Jeonsah
Im not even sure how to start this problem. Is there a clue you can give me?
• Jan 29th 2011, 01:13 PM
Ackbeet
Well, you're not asked to solve the DE, but to verify the solution. So, I would plug the given solution into the DE and see if you get an equality. What do you get when you follow that path?
• Jan 29th 2011, 01:27 PM
Jeonsah
hmph. i just did:
if $x = -1$

$-2x^2 +2x^2 = 0$

$-2 + 2 = 0$

$0 = 0$

$if x = 1$

$2x^2 -2x^2 = 0$

$2 - 2 = 0$

$0=0$

Is this what its asking for?
• Jan 29th 2011, 02:33 PM
HallsofIvy
Not quite. You cannot just choose two values of x. If x is any positive number, then $y= x^2$ so that y'= 2x. The equation xy'-2y = 0 becomes $x(2x)- 2x^2= 2x^2- 2x^2= 0$ so the equation is satisfied for any positive x. If x is negative, $y= -x^2$. Do the same with that. Most importantly, what happens at x= 0? In particular what is the derivative of y at x= 0? (You can't just differentiate $x^2$ and set x= 0 because the derivative involves a limit from both sides: If x= 0 and h is positive, then x+h= 0+ h= h is positive, if h is negative, x+ h= h is negative.

$\lim_{h\to 0^+} \frac{y(h)- y(0)}{h}= \lim_{h\to 0}\frac{2h^2}{h}= ?$
$\lim_{h\to 0^-} \frac{y(h)- y(0)}{h}= \lim_{h\to 0}\frac{-2h^2}{h}= ?$
If those two limits are the same, that is the dervative at x= 0. If they are not, the function is not differentiable at x= 0.