Skip to main content
GameDev.net gamedev.net
🔒 Locked

Help with Chain Rule problem (Solved)

Started by ontheheap Oct 11, 2005 at 12:03 PM 5 replies 2.7k views
Original Post
ontheheap
ontheheap
I've been stuck on this for the last 20 minutes, trying to figure out why the back of my book is getting the answer it is. Here's the problem and what I've done: And yes, this is (non-graded) homework.
 
The Problem
Find: dy/dx at x = 2 
Given: y = (s+3)^2 , s = sqrt(t - 3), t = x^2
So I know I'm just finding dx/dy (which according to the chain rule is just (dy/ds)*(ds/dt)*(dt/dx)). Here's what I get for those values:

dy/ds = ((s+3)(s+3))' = (s^2 + 6s + 9)' = 2s + 6
ds/dt = (sqrt(t - 3))' = sqrt(1) = 1
dt/dx = (x^2)' = 2x
So my equation is: dy/dx = (2s + 6) * (1) * (2x) Putting in 2s + 6 = 2(sqrt(t - 3) + 6) = 2(sqrt(x^2 - 3) + 6) So the final solution is:

(2(1) + 6) * (1) * (4) = 8 * 4 = 32.
The book says the solution is 16, so either I'm making a really stupid mistake somewhere or the book is wrong. I'm thinking the first case is more likely than the second. [Edited by - ontheheap on October 12, 2005 7:00:47 AM]
Thermodynamics
Thermodynamics
It might help to remember that square roots can be written as that quantity to the 1/2 power.

look at your ds/dt again.
[s]I am a signature virus. Please add me to your signature so that I may multiply.[/s]I am a signature anti-virus. Please use me to remove your signature virus.
Thermodynamics
Thermodynamics
I just looked again. Judging by how you solved dy/ds, you are not understanding the chain rule entirely.

You should not expand that first. Use the chain rule to get 2s+6
link
[s]I am a signature virus. Please add me to your signature so that I may multiply.[/s]I am a signature anti-virus. Please use me to remove your signature virus.
ontheheap
ontheheap
Thanks Thermodynamic. I see where I made the mistake and now I'm getting 16 as the final answer. I appreciate the help!

Just to clarify where I made the mistake (in case anyone cares):

I wrongly assumed that (sqrt(t-3))' was 1. It should be:

f(t) = t^(1/2)
g(t) = t - 3

f'(t) = (1/2)t^(-1/2)
g'(t) = 1

f'(g(t)) * g'(t) = f'(t-3) * 1 = :

1/2 * 1 / sqrt(t-3) = 1 / 2 * sqrt(t-3) which ends up being 1/2 when x = 2. That explains why I was getting 32 instead of 16 as my final answer!

[Edited by - ontheheap on October 11, 2005 9:26:40 PM]
timw
timw
have you learned how to make diagrams for this stuff? it's really simple if you learn how to make a diagram, you don't even have to remeber the various forms of the rule, this will help you a lot when you have to deal with multivariable functions, where it gets hairy.

x = f(s), s = g(t)

x-->s--->t

so dx/dt = (dx/ds)*(ds/dt)

a more complicated example

x = f(s, t), s = g(a), t = h(a)

you have
x->s->a
x->t->a

(generally this is written with just one x, but ascii suck on the board so)

just add the two, but notice we got two choices when we first leave x, those are s, and t. when we have two choices we use partial dirivative signs. we then add the respective contributions.

dx/da = (px/ps)*(ds/da) + (px/pt)*(dt/da)

note: this is why it's not a good idea to simply think of them as baing ratios, when you have partials, you can't think that way.

also that thing you made the mistake on is also a chain rule, suppose you reformulate your problem as

y = a^2, a = s+3, s = sqrt(b), b = t - 3, t = x^2

here I just used the chain rule explicitly instead of implicitly. then you got

dy/dx = dy/da*da/ds*ds/db*db/dt*dt/dx

try it lol, it avoids your mistake. at the cost of more work.

Tim
ontheheap
ontheheap
Quote:
Original post by timw
y = a^2, a = s+3, s = sqrt(b), b = t - 3, t = x^2

here I just used the chain rule explicitly instead of implicitly. then you got

dy/dx = dy/da*da/ds*ds/db*db/dt*dt/dx

try it lol, it avoids your mistake. at the cost of more work.

Tim


That's much clearer than the way I was doing it (using the dx/dy notation for part of it and f() g() for the other part). Thanks. We haven't reached partial derivatives yet (and I don't think I'll see them until at least next semester), but thanks for the info all the same.
grhodes_at_work
grhodes_at_work
Quote:
Original post by ontheheap
And yes, this is (non-graded) homework.


Read the Forum FAQ. Homework/schoolwork is a violation of forum policy. Thread closing. I don't feel the outcome here was harmful, but please do not post homework problems here again.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.