# [mostly about the chain rule]

1. Oct 28, 2014

### Fredrik

Staff Emeritus
Mentor's note: These posts were split off from a thread in the textbooks forum. Most of them are about calculus, even though they start off with a non-calculus question. I was too lazy to split them further into two threads

-----------------------------------

I don't know what books to recommend, but I can answer the specific question. Feel free to post more of them. In this case, the vectors are ordered pairs of real numbers. In particular, we have i=(1,0) and j=(0,1). Addition of ordered pairs is defined by (a,b)+(c,d)=(a+c,b+d) and the product of a real number and an ordered pair is defined by k(a,b)=(ka,kb).

The calculation of the magnitude of that vector is pretty straightforward if you know these definitions and the identity $\sin^2x+\cos^2x=1$, which is just a special case of the pythagorean theorem.
\begin{align}
&\mathbf r(t)=r(\mathbf i\cos\omega t+\mathbf j\sin\omega t) =r(\cos\omega t\, (1,0)+\sin\omega t\, (0,1)) = r((\cos\omega t,0)+(0,\sin\omega t))\\
&\phantom{\mathbf r(t)}=r(\cos\omega t+0,0+\sin\omega t)=(r\cos\omega t,r\sin\omega t),\\
&|\mathbf r(t)|^2=(r\cos\omega t)^2+(r\sin\omega t)^2= r^2\cos^2\omega t+r^2\sin^2\omega t=r^2(\cos^2\omega t+\sin^2\omega t)=r^2.
\end{align} As you can see, the magnitude is r, not 1. Perhaps that's what you meant to say. Or maybe the professor was referring to the vector between the parentheses, which is just $(\cos\omega t,\sin\omega t)$.

Last edited: Oct 29, 2014
2. Oct 28, 2014

### christian0710

Thank you so much for the help, now it's perfectly clear! Can you also help me understand this one?
It's newtonian mechanics: The professor wrote accelreation and velocity like this

dv/dt =a
v*d(v)/dt =a*v as

The he wrote
v*d(v)/dt = d(v^2/2)/dt

I don't see what mathematical rule or how he got from v*d(v)/dt to d(v^2/2)/dt

I know the chain rule and do understand derivative but i Just can't understand this way of writing it and how he got there.

3. Oct 28, 2014

### SredniVashtar

What is the derivative w.r.t. t of the product of two functions f(t) and g(t)?
What if f(t)=g(t)=v(t)?

4. Oct 28, 2014

### Fredrik

Staff Emeritus
The chain rule tells you that $\frac{d}{dt}v(t)^2=2v(t)v'(t)=2v(t)a(t)$. Divide by 2, and you have the result you want.

It's much harder to find this result starting with $v\frac{dv}{dt}$. You pretty much have to have seen the trick before. One possible way to think is this: The second factor is equal to $v'(t)$. If there's a function f such that the first factor is equal to $f'(v(t))$, then we can write
$$v(t)\frac{dv(t)}{dt}=f'(v(t))v'(t)=(f\circ v)'(t)=\frac{d}{dt}\big((f\circ v)(t)\big) =\frac{d}{dt}f(v(t)).$$ There may be many such functions, but the above is true for all of them, so we can just try to find the simplest possible one. Every f such that $f'(x)=x$ for all real numbers x satisfies $f'(v(t))=v(t)$ for all t. The simplest f of that kind is defined by $f(x)=\frac 1 2 x^2$ for all real numbers x. If we use this f, we have $f(v(t))=\frac 1 2 v(t)^2$, so the above turns into
$$v(t)\frac{dv(t)}{dt}=\frac{d}{dt}\left(\frac 1 2 v(t)^2\right).$$ Another approach is to use the product rule instead of the chain rule. It tells you that
$$\frac{d}{dt}v(t)^2=v'(t)v(t)+v(t)v'(t)=2v(t)v'(t)=2v(t)a(t).$$ Again divide by 2, and you have the result you want. One way to discover this approach, once you have gotten used to the product rule in the form $f\frac{dg}{dx}=\frac{d}{dx}(fg)-\frac{df}{dx}g$ is to start with
$$v\frac{dv}{dt}=\frac{d}{dt}v^2-\frac{dv}{dt}v.$$ This turned out to not make the expression simpler, but now we see that if we add $v\frac{dv}{dt}$ to both sides, we get $2v(t)v'(t)=\frac{d}{dt}v^2$.

Last edited: Oct 28, 2014
5. Oct 28, 2014

### christian0710

I think this part confuses me
The chain rule says
f(g(x))' = f'(g(x))*g'(x)

but dv(t)^2/dt is equivalent to (f(x))^2 So i don't se why to chain rule applies to a function squared which has no inner function (i assume v(t) if a function of time, but time is not a function, it's just a variable. The chain rule - as i understand it - only applies if i have a function v(t) = something and t= something.

Thank you for showing me that big middlepart trick, I have no idea how the professor would assume you knew that from calculus, but it's smart :)

With respect to the product rule, what I'm use to is
(f(x)*g(x))' = f'g+fg'

but here i assume v(t)^2 is interpreted as v(t)*v(t) then it makes good sense :)

So is it always legitimate to say that
v*dv/dt = d(v^2/2)/dt and do you always use either the chain rule, the product rule or your trick to get from v*dv/dt to d(v^2/2)/dt?

Thank you again!

6. Oct 29, 2014

### Fredrik

Staff Emeritus
I'm not a fan of notations like $(f(x)g(x))'$. f is a function. f(x) is a number. Since the value of f(x) (i.e. the number represented by the notation f(x)). is completely determined by the value of x, we say that f(x) is a "function of" x, but f(x) is still not a function. So you don't put a prime on something like f(x)g(x). The product of two numbers is a number. Instead you define the product of two functions by (fg)(x)=f(x)g(x), and write (fg)'(x). Similarly, you define the composition of two functions by $(f\circ g)(x)=f(g(x))$ and you write $(f\circ g)'(x)$ instead of f(g(x))'.

I don't quite understand what you're saying here. We certainly have to use the chain rule to evaluate $\frac{d}{dt}v(t)^2$. (Are you thinking of something like $\frac{d}{dv}v^2$?). v is a function, and "squared" is another function. If f is defined by $f(x)=x^2$ for all x, then $v(t)^2=f(v(t))=(f\circ v)(t)$. So v is the inner function.

Assuming that v is a differentiable function from (an open subset of) ℝ to ℝ, and that dv/dt denotes its derivative, then yes, it's legitimate. There may be other ways to find the result though. I think I showed you the two easiest ways and one of the more difficult ways. The easiest way is the first one I showed you. You just note that the chain rule tells us that $\frac{d}{dt}v(t)^2=2v(t)v'(t)$. (A person who has done that calculation many times before may remember that when he encounters the expression $va$, which really means $v(t)v'(t)$. It's very likely that this is how it was discovered).

7. Oct 29, 2014

### christian0710

This is starting to make good sense now, thank's to your help:D

So a last couple of questions regarding notations:

Is v^2(t) the same as v(t)^2 or do they mean two different things?

And is it incorrect to write dv^2/dt, since v could be interpreted as a variable and not a function v(t)? So a correct way is to write dv(t)^2 /dt?

When you divide 2*v*v' with 2 then you also divide dv(t)^2/dt by 2, does that mean that dv(t)^2/dt/2 is the same as d(v(t)^2/2)/dt? I thouggh that the rules for fractions was (a*v)/b/2 = (a*v)/2b and not (a*(v/2))/b but maybe i'm interpreting dv/dt/2 in a wrong way?

Last question
So If I were to follow the Libenitz notation with respect to the chain rule:
dz/dx=dz/dy * dy/dz

If this then correctly written?

Dv(t)^2/dt

and I would set z=v^2 and y=v(t)

Then we get

Dv(t)^2/dt = dv^2/dv * dv(t)/dt = (2*v)*dv/dt?

That makes great sense if this is correctly understood?

Last edited: Oct 29, 2014
8. Oct 29, 2014

### Fredrik

Staff Emeritus
They have different definitions but still represent the same number. The product of two functions f and g is defined as the function fg such that $(fg)(x)=f(x)g(x)$ for all x. So for all t, we have $v^2(t)=(vv)(t)=v(t)v(t)=v(t)^2$. The right-hand side is the square of the real number $v(t)$.

It's OK. I would interpret that notation as $(v^2)'(t)$ (with $v^2$ defined as above), and that's exactly what we want.

We're not using a rule for fractions. It's a rule for derivatives. The product of a number k and a function f is defined as the function kf such that $(kf)(x)=kf(x)$ for all x. The definitition of "derivative" implies that $(kf)'=kf'$: For all x, we have
\begin{align}
(kf)'(x)=\lim_{h\to 0}\frac{(kf)(x+h)-(kf)(x)}{h} =k\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}=kf'(x).
\end{align}

That should be $$\frac{dz}{dx}=\frac{dz}{dy}\frac{dy}{dx}.$$
Don't use an uppercase D there.

If z,v,t are three variables (representing real numbers) such that the value of v is determined by the value of t, and the values of v and z are related by $z=v^2$, then you can write
$$\frac{dz}{dt}=\frac{dz}{dv}\frac{dv}{dt}=\frac{d(v^2)}{dv}\frac{dv}{dt}=2v\frac{dv}{dt}.$$

9. Oct 29, 2014

### christian0710

Thank you frederik. I think i understand everything you wrote now.. I just want to make sure I understood this first part:

So
dv(t)^2/dt/2 is the same as d(v(t)^2/2)/dt ? Back when you divide 2v(t)a(t) = dv(t)^2 /dt with 2? divission of dv(t)^2 /dt with two looks like this at first (dv(t)^2 /dt)/2 but means this d(v(t)^2/2)/dt?

Sory for my lack of latex experience, I know it looks much better :)
Have a great day.

10. Oct 29, 2014

### Fredrik

Staff Emeritus
Yes, that's correct. It's just the rule $kf'=(kf)'$ (with k=1/2 and f defined by $f(t)=v(t)^2$ for all t).

11. Oct 30, 2014

### christian0710

Thank you so much for your help Frederik! I'll continue studying physics, just gotta get good at the math as well :)

12. Oct 31, 2014

### christian0710

Hi again, I just want to Mae sure I understand how to use the leibenitz notation: if write dv^2/dt would I, according to libenitz, write it as this?
dv^2/dt=dv^2/dv• dv/dt

I'm wondering when the chain rule is written as dz\dx=dz\dy•dy/dx then in the above example Z must be equal to the outer function v^2 and y=v (the inner function). Is that correct?

13. Oct 31, 2014

### Fredrik

Staff Emeritus
Yes, that's correct.