Calculating df/dt using the chain rule

In summary, the conversation discusses the use of the chain rule to compute the derivative of the function f(x,y) with respect to t, where x and y are defined in terms of t. The individual asking the question is unsure of whether they should substitute the x and y functions into the original equation, and they describe their attempt at solving the problem by calculating the partial derivatives and finding the gradient at any given time. They also mention using the dot product to find the rate of change in height per unit time. They inquire about whether they could have taken a shortcut by directly substituting the x and y functions into the equation.
  • #1
noelo2014
45
0
Hello everyone, first post here.

Homework Statement


Let f(x,y)=x2y+y2x , where x=sin2t
and y=cos2t.

Use the chain rule to compute df/dt


Homework Equations



f(x,y)=x2y+y2x

x=sin2t
y=cos2t

The Attempt at a Solution



This is pretty much the exact wording of the question, it's a little vague, and I'm not sure if I'm supposed to sub in sin2t and cos2t in the f(x,y) equation

I did it by calculating the partial derivatives of f with respect to x and y thus finding the gradient of f, I then found the gradient at any time t by subbing in the x/y equations above into the gradient,

I then calculated dx/dt and dy/dt to give the velocity vector in the x/y plane.

Finally I calculated the dot product of this velocity vector and the gradient vector and ended up with a pretty long equation as my answer: 2 sin(t)cos(t)(cos4t-sin4t).

I'm pretty sure this is the correct answer assuming my method and interpretation of the question is right. However I'm wondering if I could have taken a short-cut by initaially subbing in the x/y functions into f thus making f(x,y) into f(t), differentiating it with respect to t.

I did this (in Maple), and ended up with a different answer which gave a different answer when I substituted in an arbitrary value for t. I'm finding it quite hard to visualize this question and I hope someone can help shed some light on it (exam January)

Thanks!
 
Physics news on Phys.org
  • #2
Hi noelo2014...

Welcome to PF!

Your answer looks correct .

By the way your answer 2sintcost(cos4t-sin4t) can be written in different ways .

2sintcost(cos4t-sin4t) = 2sintcost(cos2t-sin2t) = sin2tcos2t = (1/2)sin4t .
 
  • Like
Likes 1 person
  • #3
noelo2014 said:
I'm pretty sure this is the correct answer assuming my method and interpretation of the question is right. However I'm wondering if I could have taken a short-cut by initaially subbing in the x/y functions into f thus making f(x,y) into f(t), differentiating it with respect to t.

It will be a lot easier if you substitute the functions of t into the equation.
 
  • #4
noelo2014 said:
Hello everyone, first post here.

Homework Statement


Let f(x,y)=x2y+y2x , where x=sin2t
and y=cos2t.

Use the chain rule to compute df/dt


Homework Equations



f(x,y)=x2y+y2x

x=sin2t
y=cos2t

The Attempt at a Solution



This is pretty much the exact wording of the question, it's a little vague, and I'm not sure if I'm supposed to sub in sin2t and cos2t in the f(x,y) equation

I did it by calculating the partial derivatives of f with respect to x and y thus finding the gradient of f, I then found the gradient at any time t by subbing in the x/y equations above into the gradient,

I then calculated dx/dt and dy/dt to give the velocity vector in the x/y plane.

Finally I calculated the dot product of this velocity vector and the gradient vector and ended up with a pretty long equation as my answer: 2 sin(t)cos(t)(cos4t-sin4t).

I'm pretty sure this is the correct answer assuming my method and interpretation of the question is right. However I'm wondering if I could have taken a short-cut by initaially subbing in the x/y functions into f thus making f(x,y) into f(t), differentiating it with respect to t.

I did this (in Maple), and ended up with a different answer which gave a different answer when I substituted in an arbitrary value for t. I'm finding it quite hard to visualize this question and I hope someone can help shed some light on it (exam January)

Thanks!

So, you used
[tex] \frac{df}{dt} = \frac{\partial f(x,y)}{\partial x} \frac{dx}{dt}
+ \frac{\partial f(x,y)}{\partial y} \frac{dy}{dt}[/tex]
Woulddn't it have been more revealing to just write the formula instead of describing it in English? (If you don't like using LaTeX you can write it in ASCII as df/dt = f_x*(dx/dt) + f_y*(dy/dt), etc.)
Anyway, if you do everything correctly you will get the correct answer.

Your answer is equivalent to the one I got in Maple (which might be the same one you got in Maple, but you did not tell us what that was)! In other words, if you play around with trigonometric identities, etc., you should be able to show they are the same.
 
  • #5
Thanks for the quick replies.

I'm mainly trying to develop a good intuition for these questions, When I originally read the question I visualized a wavy surface, with the height denoted by the value of the f(x,y) function.

when I saw the x=sin2t y=cos2t I thought "Ok I'm moving along a path on top of this surface, my x/y coordinates are determined by the time (t), and my height is denoted by my x/y coordinates therefore my height is determined by the time (t).

(I realize this is like playschool math to many of you guys reading this, but bare with me).

I did some problems the other day about motion along a curve and the way I solved them was

1. Find the gradient of the surface (let's call this equation G)

2. Find the gradient at any time t by substituting the x(t) and y(t) functions in for x and y respectively into the equation G (from my limited understanding of calculus this will tell me the direction I need to be facing at any time t in order to have the steepest ascent in front of me, assuming I'm already standing on the point on the curve where I'm supposed to be).

3. Find the derivatives of the x/y equations with respect to t (dx/dt and dy/dt). This will tell me how fast and in what direction I'm traveling in the x direction and how fast and in what direction I'm traveling in the y direction.

4. Calculate the dot product of (2) and (3) which will give my rate of change in height (z) per unit time (t) at my current position, in my current direction. From what I know, if the way I'm currently moving is in a similar direction to the direction of steepest ascent the rate of change will be high and positive whereas if they're in opposite directions it will be high but negative

My question is: Instead of this method, can I just substitute sin2t in place of x and cos2t in place of y in x2y+y2z , thus eliminating the x/y coordinates and just directly finding my height (z) from any given t, thus giving me a short-cut to the rate of change? Although I don't know where I am in the XY plane or in what direction I'm facing I do know the rate at which I'm getting higher or lower, as long as I know what time it is?

(Sorry if this sounds childish)

I realize one person (PeroK) has already told me this will work, the point is I've already tried it and got a different answer although it's very likely I made a mistake somewhere. I can check it again later. At the moment I'm more concerned with just getting a good feel for the calculus and wordy analogy's are highly welcome.

Appreciate any help
 
Last edited:
  • #6
noelo2014 said:
I've already tried it and got a different answer
It will be much easier to help you find where you have gone wrong if you post the detailed working for both methods.
 
  • #7
It will be much easier to help you find where you have gone wrong if you post the detailed working for both methods.

The detailed work is all on paper/unsaved. I'm not doing any more calculus today, I'll post it tomorrow if I don't get get a good answer or figure it out for myself. BTW this isn't homework, it's a question from a previous exam paper in my Calculus 3 course. I'm doing my exam in January :)
 
  • #8
You definitely should substitute and simplify before you differentiate. Note that:

[itex]f(x,y)=xy(x+y)[/itex]

And that gives you a big hint on how to simplify things before you get started!
 
  • #9
I would add that, if you are doing problems in a section where you are learning the chain rule, it is self-defeating to substitute and simplify before differentiating. You get used to using the chain rule by using it. After you have mastered the chain rule, then you can worry about whether substituting first would have been easier.
 
  • #10
I did this problem in Maple (both ways), here's the output (don't know if this will come out right)
I had terrible problems with exporting this from maple, even harder than doing the maths itself, I had to take a screenshot... anyway here it is.


maple_output.jpg

I guess either way is correct.

Yep, both ways seem to work although the direct substitution method is a lot faster

Interesting and tiring problem. My brain needs a rest, thanks for the replies everyone :biggrin:
 
Last edited:
  • #11
noelo2014 said:
Thanks for the quick replies.

I'm mainly trying to develop a good intuition for these questions, When I originally read the question I visualized a wavy surface, with the height denoted by the value of the f(x,y) function.

when I saw the x=sin2t y=cos2t I thought "Ok I'm moving along a path on top of this surface, my x/y coordinates are determined by the time (t), and my height is denoted by my x/y coordinates therefore my height is determined by the time (t).

(I realize this is like playschool math to many of you guys reading this, but bare with me).

I did some problems the other day about motion along a curve and the way I solved them was

1. Find the gradient of the surface (let's call this equation G)

2. Find the gradient at any time t by substituting the x(t) and y(t) functions in for x and y respectively into the equation G (from my limited understanding of calculus this will tell me the direction I need to be facing at any time t in order to have the steepest ascent in front of me, assuming I'm already standing on the point on the curve where I'm supposed to be).

3. Find the derivatives of the x/y equations with respect to t (dx/dt and dy/dt). This will tell me how fast and in what direction I'm traveling in the x direction and how fast and in what direction I'm traveling in the y direction.

4. Calculate the dot product of (2) and (3) which will give my rate of change in height (z) per unit time (t) at my current position, in my current direction. From what I know, if the way I'm currently moving is in a similar direction to the direction of steepest ascent the rate of change will be high and positive whereas if they're in opposite directions it will be high but negative

My question is: Instead of this method, can I just substitute sin2t in place of x and cos2t in place of y in x2y+y2z , thus eliminating the x/y coordinates and just directly finding my height (z) from any given t, thus giving me a short-cut to the rate of change? Although I don't know where I am in the XY plane or in what direction I'm facing I do know the rate at which I'm getting higher or lower, as long as I know what time it is?

(Sorry if this sounds childish)

I realize one person (PeroK) has already told me this will work, the point is I've already tried it and got a different answer although it's very likely I made a mistake somewhere. I can check it again later. At the moment I'm more concerned with just getting a good feel for the calculus and wordy analogy's are highly welcome.

Appreciate any help

You should get the same answer using either method---that is, if you substitute x = sin(t)^2 and y = cos(t)^2 right away into f(x,y), you will have some function F(t) that you can deal with directly. You keep saying you get a different answer that way, but you keep refusing to tell us what that answer actually IS---so how can we possibly help you?
 
  • #12
Ray Vickson said:
You should get the same answer using either method---that is, if you substitute x = sin(t)^2 and y = cos(t)^2 right away into f(x,y), you will have some function F(t) that you can deal with directly. You keep saying you get a different answer that way, but you keep refusing to tell us what that answer actually IS---so how can we possibly help you?

see my previous post
 
  • #13
PeroK said:
It will be a lot easier if you substitute the functions of t into the equation.
That's true, but LCKurtz makes an important point, below.

LCKurtz said:
I would add that, if you are doing problems in a section where you are learning the chain rule, it is self-defeating to substitute and simplify before differentiating. You get used to using the chain rule by using it. After you have mastered the chain rule, then you can worry about whether substituting first would have been easier.
I agree 100% with LCKurtz's comments. In the first post of this thread, it says "Use the chain rule to compute df/dt". I would also recommend against using Maple or the like to do the actual work. Possibly you used Maple to confirm what you did manually, but that wasn't crystal clear to me.
 
  • #14
Mark44 said:
That's true, but LCKurtz makes an important point, below.


I agree 100% with LCKurtz's comments. In the first post of this thread, it says "Use the chain rule to compute df/dt". I would also recommend against using Maple or the like to do the actual work. Possibly you used Maple to confirm what you did manually, but that wasn't crystal clear to me.

Yes.

I'm not using maple to do my work, I'm using it to check my work. I'm studying for a calculus exam in January. I did the problem both ways with maple and (beforehand) on paper using the chain rule.

I'm not using maple to do homework, nor would I. In fact I usually find it easier to work it out on paper since I find maple such a frustrating piece of software. If you read my posts I said that I was having trouble visualizing this problem and Intuitionizing (?) it. I was hoping for someone to post something enlightening that would help. that's all.
 
  • #15
Doing the direct substitution, see Perok's hint in Post #8. f(x,y)=xy(x+y) You should recognize that x+y =sin2t+cos2t =1.

ehild
 
  • Like
Likes 1 person
  • #16
ehild said:
Doing the direct substitution, see Perok's hint in Post #8. f(x,y)=xy(x+y) You should recognize that x+y =sin2t+cos2t =1.

ehild

Thanks, I didn't realize that

So the problem becomes f(x,y) = xy

-> f(t) =sin2t cos2t

-> df/dt= (d/dt(sin2t))(cos2t) + (sin2t)((d/dt)cos2t)

-> df/dt= (2 sin(t) cos(t) )(cos2t) + (sin2t)(-2 cos(t) sin(t))

= 2 sin(t)cos(t) ((cos2t) - (sin2t))

..not using maple:)
I think this is right, let me check...
(this is much easier on paper)
...
anyway thanks. I'm learning

Edit: checked that... correct, and yet another way to write the answer
 
Last edited:
  • #17
noelo2014 said:
Thanks, I didn't realize that

So the problem becomes f(x,y) = xy

-> f(t) =sin2t cos2t

-> df/dt= (d/dt(sin2t))(cos2t) + (sin2t)((d/dt)cos2t)

-> df/dt= (2 sin(t) cos(t) )(cos2t) + (sin2t)(-2 cos(t) sin(t))

= 2 sin(t)cos(t) ((cos2t) - (sin2t))

..not using maple:)
I think this is right, let me check...
(this is much easier on paper)
...
anyway thanks. I'm learning

Edit: checked that... correct, and yet another way to write the answer

And while you are at it, simplify it some more:$$
\sin^2(t)\cos^2(t) = (\sin(t)\cos(t))^2=(\frac 1 2 \sin(2t))^2=\frac {\sin^2(2t)} 4$$Differentiate that using the chain rule.
 
  • #18
[itex] ... f(t) = \frac14 sin^2(2t) = \frac18 (1 - cos(4t))[/itex]

Almost avoids using the chain rule at all!
 
  • #19
As long as you're trying different approaches, you could also use
$$f(x,y) = x^2y + xy^2 = \frac{1}{3}[(x+y)^3 - x^3 - y^3] = \frac{1}{3}(1 - x^3 - y^3).$$ :wink:
 
  • #20
There are some very important trigonometric equations to keep in mind.

[tex]\cos^2(x)+\sin^2(x)=1[/tex]
[tex]\cos^2(x)-\sin^2(x)=\cos(2x)[/tex]
[tex]2\sin(x)\cos(x)=\sin(2x)[/tex]

[tex]\frac{1-\cos(2x)}{2}=\sin^2(x)[/tex]
[tex]\frac{1+\cos(2x)}{2}=\cos^2(x)[/tex]

ehild
 
  • #21
LCKurtz said:
And while you are at it, simplify it some more:$$
\sin^2(t)\cos^2(t) = (\sin(t)\cos(t))^2=(\frac 1 2 \sin(2t))^2=\frac {\sin^2(2t)} 4$$Differentiate that using the chain rule.

I tried differentiating that on paper, I figured it as a chain-rule problem with a power-rule as the outside function and a sin as the inside function,

So I got :

df/dt = 1/4 * (sin2(2t)) [bring the 1/4 out to the front]

= 1/2 * (sin(2t)) * d/dt(sin(2t)) [power rule+chain rule]

= 1/2 sin (2t) cos (2t) [sine]

With the knowledge that I have this is the simplest form can put it in. Gonna check it in maple...

[edit]
...and it seems to be wrong.. :(
 
  • #22
[itex]2sin(2t)cos(2t) = sin(4t)[/itex]
 
  • #23
PeroK said:
[itex]2sin(2t)cos(2t) = sin(4t)[/itex]

I think you may have misread my maths (probably because I don't know how to use Latex. Actually How do you post using Latex?

Also I fed this problem into an online differentiation tool and it gave sin(2t)cos(2t) just like Maple and it used the Quotient rule.

EDIT: SORRY My mistake, It didn't use the quotient rule, it used the power and chain rules, It then used the chain rule again to differentiate sin(2t) which gives cos(2t)*2 (not cos(2t) ), which makes the half and the two cancel each other out.

My bad
 
Last edited:
  • #24
You forgot about the chain rule when differentiating sin(2t). It's 2cos(2t).
 
  • Like
Likes 1 person

1. What is the chain rule and why is it important in calculating df/dt?

The chain rule is a mathematical formula used to find the derivative of a composite function. It is important in calculating df/dt because many real-world problems involve functions that are composed of multiple functions, and the chain rule allows us to find the derivative of the entire function by breaking it down into smaller components.

2. How do you use the chain rule to calculate df/dt?

To use the chain rule, you first identify the composite function and its individual components. Then, you take the derivative of the outer function and multiply it by the derivative of the inner function. This gives you the derivative of the composite function, which is df/dt in this case.

3. Can the chain rule be applied to any composite function?

Yes, the chain rule can be applied to any composite function, as long as the individual components are differentiable. This means that their derivatives exist and can be calculated.

4. Are there any common mistakes to avoid when using the chain rule to calculate df/dt?

One common mistake is forgetting to take the derivative of the inner function when applying the chain rule. Another mistake is mixing up the order of the derivatives, as the chain rule requires the derivative of the outer function to be taken first.

5. How can I practice and improve my skills in calculating df/dt using the chain rule?

The best way to practice and improve your skills in using the chain rule is to solve a variety of problems involving composite functions. You can also seek out online resources or textbooks with practice problems and solutions. Additionally, working with a tutor or attending a math study group can also help you improve your skills in this area.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
156
  • Calculus and Beyond Homework Help
Replies
1
Views
583
  • Calculus and Beyond Homework Help
Replies
1
Views
868
  • Calculus and Beyond Homework Help
Replies
5
Views
981
  • Calculus and Beyond Homework Help
Replies
3
Views
902
  • Calculus and Beyond Homework Help
Replies
8
Views
469
  • Calculus and Beyond Homework Help
Replies
4
Views
971
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
17
Views
980
  • Calculus and Beyond Homework Help
Replies
3
Views
570
Back
Top