# Second derivative - wolfram giving one answer, professor giving another

1. Aug 28, 2011

### boredat20

Hi everybody.

I have a question regarding an example problem at about 22min on this lecture http://ocw.mit.edu/courses/mathemat...ecture-2-eulers-numerical-method-for-y-f-x-y/

The equation in question is y'=x$^{2}$-y$^{2}$.

In an example regarding the Euler method, Prof. Mattuck describes the second derivative of the above function as

y'' = 2x - 2yy'

specifically mentioning the chain rule. Now, as I understand it (working backwards of course), the only way to this solution would be to consider y$^{2}$ as the function y(y(x)), giving the solution

yy' + y'y = 2yy'.

Now, assuming I correctly understand how the 2yy' portion of the solution was derived, my question is: how exactly was the second derivative determined to be

y""= 2x - 2yy' ?

If we take the derivative with respect to y (which presumably give us the 2yy' term we're looking for), wouldn't the "x" term (x$^{2}$) be zero, as shown:

d/dy (y')= d/dy (x$^{2}$)- d/dy (y$^{2}$) $\Rightarrow$ y''= 0 - 2yy'

Wolfram Alpha also seems to agree with me, but I'm afraid I'm more muddled than I'd like to believe

2. Aug 28, 2011

### gb7nash

If we know that y is a function of x, then your prof. is correct. This is an application of implicit differentiation.

This is wrong. y2 is just what it looks like. y(x)*y(x)

This isn't right. On both sides, you're taking the derivative with respect to x, not y. Think about it. y'' is the derivative of y' with respect to x, not y. Following this methodology, you get:

$$\frac{d}{dx} y' = \frac{d}{dx}x^2 - \frac{d}{dx}y^2$$

With the application of the chain rule on y^2, you obtain the answer.

Last edited: Aug 28, 2011
3. Aug 28, 2011

### SteamKing

Staff Emeritus
The value of the second derivative of y' = x^2 - y^2 depends on which variable is used as the independent variable. In this case, y is understood to represent y(x). When taking the derivative with respect to x, the function becomes y" = 2x - 2yy'. Your Mathematica calculation is not based on taking the derivative with respect to x, and the result is of course different.

4. Aug 28, 2011

### boredat20

Now I understand. Thanks!