# Chain rule annoyance

1. Jan 31, 2009

### bsodmike

1. The problem statement, all variables and given/known data
It is given that, $$\left(e^{-t^2}y\right)'=e^{-t^2}\left(y'-2ty\right)$$, which I am trying to work out.

2. Relevant equations
$$f'(t)=h'(g(t))g'(t)$$

$$(u\cdot v)'=u'v+uv'$$

3. The attempt at a solution
$$f(t)=e^{-t^2}y=h(g(t))$$

$$\text{let}\;g(t)=u=t^2\;\text{and}\;h(u)=e^{-u}y$$

$$\text{thus}\;g'(t)=2t$$

$$h'(u)=\left(e^{-u}y\right)'=e^{-u}\dfrac{dy}{du}-e^{-u}y$$

Hence,
$$f'(t)=\left[e^{-t^2}y'-e^{-t^2}y\right]\cdot 2t$$

This does not match the expected solution; your help would be much appreciated!

Cheers
Mike

2. Jan 31, 2009

### cristo

Staff Emeritus
Doesn't it? Try factoring out $e^{-t^2}$

3. Jan 31, 2009

### bsodmike

Cristo, the expected solution is,

$$f'(t)=e^{-t^2}y'-e^{-t^2}2ty=e^{-t^2}\left[y'-2ty\right]$$

Factoring out the exponent term from $$f'(t)$$, as obtained above,

$$f'(t)=\left[e^{-t^2}y'-e^{-t^2}y\right]\cdot 2t=e^{-t^2}2t\left[y'-y\right]$$

.i.e. we have 2t appearing on both sides?

4. Jan 31, 2009

### bsodmike

I am essentially proving the following that I found in an online text,

http://stuff.bsodmike.com/ode_integration_factor.png [Broken]

Last edited by a moderator: May 4, 2017
5. Jan 31, 2009

### cristo

Staff Emeritus
Ok, I obviously didn't look at it correctly the first time.

Your problem is in your first line where you write f(t)=h(g(t)). Your working then doesn't work because you can't write f(t) as some function of t^2. Instead, try writing f(t)=h(g(t)).y(t), where g(t)=t^2 and h(g(t))=e^{-t^2}. Then apply the product rule first, and the chain rule to the appropriate term.

6. Jan 31, 2009

### bsodmike

I seem to have figured it out. I left out something crucial earlier in changing terms from 'u' back to 't'.

$$h'(u)=\left(e^{-u}y\right)'=e^{-u}\dfrac{dy}{du}-e^{-u}y$$

It can be seen from the earlier step that,

$$g'(t)=\dfrac{du}{dt}\rightarrow du=2tdt$$

Hence,

$$h'(g(t))=\left(e^{-t^2}y\right)'=\dfrac{e^{-t^2}}{2t}\dfrac{dy}{dt}-e^{-t^2}y$$

Which gives the expected result:

$$f'(t)=\left[\dfrac{e^{-t^2}}{2t}y'-e^{-t^2}y\right]\cdot 2t=e^{-t^2}\left[y'-2ty\right]$$

Last edited: Jan 31, 2009
7. Jan 31, 2009

### Fredrik

Staff Emeritus
$$\frac{d}{dt}\big(e^{-t^2}y(t)\big)=\frac{d}{dt}(e^{-t^2})y(t)+e^{-t^2}\frac{d}{dt}y(t)=-2te^{-t^2}y(t)+e^{-t^2}y'(t)=e^{-t^2}(y'(t)-2ty(t))$$

There's no 2t in the term that contains y'(t).

Edit: I guess I'm too slow.

8. Jan 31, 2009

### cristo

Staff Emeritus
Yup, you seem to have got it. My brain obviously isn't working at this time in the morning.. sorry about that!

Still, I'll give one piece of advice. You seem to have substituted du=2tdt into the denominator of the derivative. The precise way of doing this is to use the chain rule again, and write

$$\frac{dy}{du}=\frac{dy}{dt}\frac{dt}{du}$$

and then use

$$\frac{dt}{du}=\frac{1}{2t}$$.

This will prevent any potential errors in future.

9. Jan 31, 2009

### bsodmike

Thanks Fredrik; I guess I would have arrived at that solution intuitively if I didn't try to actually apply the chain rule first (as per the attached image above).

:)

10. Jan 31, 2009

### bsodmike

Thanks cristo; I was actually aware of that, but did not specifically state it since it is sort of understood. You're right though, safer to write that step down as well to prevent mistakes :) Thanks for your help!!