# Why is this not a solution to the differential equation

1. Sep 10, 2011

### fishingspree2

1. The problem statement, all variables and given/known data
Explain why the piecewise-defined function:
$y=\begin{Bmatrix} \sqrt{25-x^{2}}, & -5< x< 0 \\ -\sqrt{25-x^{2}},&0\leq x< 5 \end{Bmatrix}$

is not a solution of the differential equation $\frac{dy}{dx}=-\frac{x}{y}$ on the interval (-5,5)

2. The attempt at a solution
I have no idea why...Differentiating y i get
$y'=\begin{Bmatrix} \frac{-x}{\sqrt{25-x^{2}}}, & -5< x< 0 \\ \frac{x}{\sqrt{25-x^{2}}},&0\leq x< 5 \end{Bmatrix}$

Substituting the denominators in y' by the corresponding expression defined by y, I get back exactly $y'=-\frac{x}{y}$ for the two pieces of interval.

To me it should be a solution...

Thank you very much.

EDIT:
The question comes from here (#26):

Last edited: Sep 10, 2011
2. Sep 10, 2011

### Tomer

Well, a solution has to be differentiable at the segment... This function isn't even continuous...

3. Sep 10, 2011

### fishingspree2

Hmm I don't really understand... I went back to read the definition of a solution and it said:

So, from what I understand, if F is a solution then its n derivatives must be continuous on I.

$y'=\begin{Bmatrix} \frac{-x}{\sqrt{25-x^{2}}}, & -5< x< 0 \\ \frac{x}{\sqrt{25-x^{2}}},&0\leq x< 5 \end{Bmatrix}$

is continuous on I since lim as x goes to 0 of y' is 0 in both pieces.

Last edited: Sep 10, 2011
4. Sep 10, 2011

### vela

Staff Emeritus
What's the derivative at x=0? Hint: It's not 0.

5. Sep 10, 2011

### fishingspree2

Why not? I would have said 0... x/sqrt(25-x^2) = 0/sqrt(25) = 0...

6. Sep 10, 2011

### vela

Staff Emeritus
Try plotting the function. You'll see why.

7. Sep 10, 2011

### fishingspree2

Here is the plot: http://img856.imageshack.us/img856/5156/function2h.th.jpg [Broken]

Intuitively I would have said that the derivative at x=0 is 0 since as x goes to 0 both pieces have a slope of 0 by looking at the graph.

However, now I remember that by definition a function must be continuous to be differentiable. I don't really understand why though.

Consider y=x^2 which we break in two at x=0 and move one part 5 units up:http://img40.imageshack.us/img40/2070/function1.th.jpg [Broken]

Even though it has a discontinuity, it don't see how the derivative is affected by this modification... it is still 2x on all of the interval, even 0....

Last edited by a moderator: May 5, 2017
8. Sep 10, 2011

### vela

Staff Emeritus
For both functions, the slope approaches 0 near the origin, but it's undefined at the origin. Go back to the definition of the derivative:
$$f'(x_0) = \lim_{h \to 0} \frac{f(x_0+h)-f(x_0)}{h}$$
For that limit to exist, the left-handed and right-handed limits have to agree, but one of them diverges.

9. Sep 10, 2011

### LCKurtz

Here's why. If f is differentiable at x0 then
$$\lim_{h\rightarrow 0}\frac{f(x_0+h)-f(x_0)}{h}=f'(x_0)$$

Intuitively, since h → 0 the only way the fraction can have a limit is if the numerator → 0, which says f is continuous at x0. To prove it rigorously write
$$\frac{f(x_0+h)-f(x_0)}{h}=f'(x_0)+\left(\frac{f(x_0+h)-f(x_0)}{h}-f'(x_0)\right) =f'(x_0) + o(h)$$
where o(h) represents the quantity in parentheses which → 0 as h → 0 since f is differentialbe at x0. Then
$$f(x_0+h)-f(x_0) = hf'(x_0) + ho(h)$$

Now if you let h → 0 it tells you that f(x0+h)→ f(x0) as h → 0 so f is continuous at x0.

Last edited: Sep 10, 2011