# Chain Rule, Differentials "Trick"

1. Aug 23, 2014

I was playing around with some simple differential equations earlier and I discovered something cool (at least for me).

Suppose you have $$y=sin(x^2) \Rightarrow \frac{dy}{dx}=2xcos(x^2)$$
What if, instead of taking the derivative with respect to $x$, I want to take the derivative with respect to $x^2$, where a simple substitution might help? $$u(x)=x^2 \Rightarrow \frac{du}{dx}=2x \Rightarrow du=2xdx$$ $$y=sin(u) \Rightarrow \frac{dy}{du}=cos(u) \Rightarrow \frac{dy}{dx^2}=cos(x^2)$$ If you undo the substitution for both instances of $u$, you arrive at the derivative with respect to $x$ $$\frac{dy}{dx^2}=\frac{dy}{2xdx}=cos(u^2) \Rightarrow \frac{dy}{dx}=2xcos(x^2)$$

Now, I understand this result is just an application of the chain rule, but, I decided to use it on integrals. Which turns out great because this is just an application of integration by parts. $$\int dy=\int 2xcos(x^2)dx=\int cos(u)du=\int cos(x^2)dx^2$$

Now, my question is, is it possible to apply this to derivatives of higher order? Here is my approach by example. $$\frac{d^2y}{dx^2}=6x$$ $$\int d^2y=\int 6xdx^2,~~~~~~~dx^2=2xdx$$ $$\int d^2y=\int 6x(2xdx)$$

In analogy to stating $\int dx^2=\int 2xdx$, how would i write $\int d^2y ~~~~$ ?

2. Aug 23, 2014

### pwsnafu

It's an application of the Riemann-Stieltjes integral.
It's not really a differential thing.

3. Aug 25, 2014

I read the article to the best of my understanding and I didn't notice anything that could help me write $\int d^2y$ explicitly so I could compute the integral using only one step of anti-differentiation (rather than two, in the case of second-order derivatives).

Last edited: Aug 25, 2014
4. Aug 25, 2014

### gopher_p

The trick that they teach you in freshman calculus and then again in DiffEQ where you take a separable DE $\frac{dy}{dx}=f(x)g(y)$ and treat $\frac{dy}{dx}$ like a ratio of differentials so that the equation can be rewritten $\frac{dy}{g(y)}=f(x)dx$ is an abuse of notation. It works (in the sense that you get a correct answer) in that particular situation, and in some others. But in general, treating the Leibniz notation like it's a fraction will get you in trouble if you don't really know what you're doing.

In the case of the second derivative, $\frac{d^2y}{dx^2}$, it most definitely cannot be treated like a fraction. Furthermore, you have conflated $d(x^2)$ with what "should" be (if it were actually a valid step) $(dx)^2$.

For what it's worth, here is the legitimate working of the general separable DE;

Given $\frac{dy}{dx}=f(x)g(y)$ has a solution $y=u(x)$, we have $u'(x)=f(x)g\left(u(x)\right)$. Whenever $g$ is nonzero, $\frac{1}{g\left(u(x)\right)}u'(x)=f(x)$. On any interval $[x_0,x_1]$ on which the solution is valid, we have $$\int_{x_0}^{x_1}\frac{1}{g\left(u(x)\right)}u'(x)\ dx = \int_{x_0}^{x_1}f(x)\ dx$$ Using the method of integration by substitution on the LHS gives $$\int_{w_0}^{w_1}\frac{1}{g\left(w\right)}\ dw = \int_{x_0}^{x_1}f(x)\ dx$$ where $w_i=u(x_i)$ for $i=1,2$.

And this looks a lot like the equation $\int\frac{1}{g(y)}\ dy=\int f(x)\ dx$ that you get using the standard trick. So treating $\frac{dy}{dx}$ like a fraction works in this case.

If you were to try and apply this approach to a second order separable DE (which is a misnomer) like $\frac{d^2y}{dx^2}=f(x)g(y)$, you'd get to the equation $$\int_{x_0}^{x_1}\frac{1}{g\left(u(x)\right)}u''(x)\ dx = \int_{x_0}^{x_1}f(x)\ dx$$ and (hopefully) realize that the method of substitution does not apply here.

Also, the Leibniz notation $\frac{d^ny}{dx^n}$ comes from the notation $\frac{d}{dx}$ of the differential operator (http://en.wikipedia.org/wiki/Differential_operator). $\frac{d^n}{dx^n}=(\frac{d}{dx})^n$ is kinda like shorthand for "do that differentiation thing $n$ times". So $\frac{d^ny}{dx^n}=\frac{d^n}{dx^n}[y]$ is notation for "do that differentiation thing to $y$ $n$ times" or, in the case of the LHS, "the result of having done that differentiation thing to $y$ $n$ times".

5. Aug 30, 2014

Thanks for your reply! I always knew that Leibniz's notation was somewhat of needed abuse. I think my problem was that my Calculus classes did not cover the Epsilon-Delta definition of limit (and in turn, the limit nature of the derivative) in detail, so I got too used to the beauty the notation can give. I just thought that you could define a second order differential $d^2y$ in the same way you can with ordinary differentials $df(x)=f'(x)dx$. I guess this is not possible. Your reply made me realize what I was doing wrong. Thanks again!