You are here:

Basic Math/implicit differtiation

Advertisement


Question
QUESTION: hello josh,

spent a long,long time on these,can you help me with the following please,

differentiate each with respect to x and find dy/dx


1)3xy^2+cosy^2 =2x^3+5

2)5^2-x^3siny+5xy=10

3)x-cos^2+y^2/x +3x^5= 4x^3

lastly

4)tan5y-ysinx+3xy^2=9


i understand the chain,quotient,and product rules

i'm just not sure where to apply them in these questions and my differntiating does go wrong at times more with numbers than sin,cosine etc.

in 1)where does -3y^2 come from ?

in 2) "     "    -5x  "     "    ?

it seems to be the numerator that i'm having problems with or collecting the right like terms for dy/dx  with respect to x.I seem to always get half of the solutions.
If tht makes any sense!

Simple lamens terms in steps would be great.

ANSWER: Hi Richard,

The general idea of implicit differentiation is this:

Given a function f(x,y) with dependencies on two variables x and y, even if we cannot write y directly in terms of x (i.e., without y appearing on both sides of an equation), we can find dy/dx assuming that y=f(x) is differentiable.

If we arrange the equation in the form f(x,y)=0, then, its derivative with respect to x must also be zero [i.e., df(x,y)/dx = 0]. After all, the RHS of "f(x,y)=0" is a constant; so its first derivative must be zero.

------------------------------
Q1) Rearrange 3*x*y^2 + [cos(y)]^2 = 2*x^3 + 5 in the form of f(x,y)=0.
   3*x*y^2 + [cos(y)]^2 - 2*x^3 - 5 = 0 will do  ....[line 1]
   Before we take the first derivative of each term w.r.t. x
   Note: When a term consists of some product of "x" and "y",
   we apply the product rule of differentiation [d(f*g)/dx = f*(dg/dx)+(df/dx)*g]
   
   Consider d[x*y^2]/dx for instance,
   d[x*y^2]/dx = [1*y^2+x*2y(dy/dx)]
   | Here, we have used implicit differentiation, where g(y)=y^2 and
   | dg/dx = (dg/dy)(dy/dx) = 2y(dy/dx).

   The other tricky bit concerns d[cos(y)^2]/dx.
   Again, using dg/dx = (dg/dy)(dy/dx), where g(y)= cos(y)^2,
   d[cos(y)^2]/dx = 2*cos(y)*-sin(y)

   Now, differentiating [line 1] w.r.t. x, we get
   3*[y^2+2y(dy/dx)] - 2*sin(y)cos(y) - 6*x^2 = 0
   3*y^2 + 6y(dy/dx) = 2*sin(y)cos(y) + 6*x^2
   (dy/dx) = [2*sin(y)cos(y) + 6*x^2 - 3*y^2]/(6y)

Q2) I am skipping over this, as it is very similar to Q1. Use the same technique.
   Have a go yourself. Get back to me if you have problems with it.

Q3) Re: "x-cos^2+y^2/x +3x^5= 4x^3" is it supposed to be [cos(x)]^2, or [cos(y)]^2.
   In any event, we need to differentiate each term w.r.t. x.
   
   d[x]/dx = 1.
   
   d[cos(x)^2] = 2*cos(x)*-sin(x) whereas
   d[cos(y)^2] = 2*cos(y)*-sin(y) (dy/dx)

   For d[y^2/x]/dx, let f=y^2, g=x.
   According to the quotient rule, d[f/g]/dx = [g*f'-f*g']/(g^2).
   Note carefully that f' and g' stand for df/dx and dg/dx, respectively.
   They are both 1st derivatives w.r.t. x.
   What is unusual here, is that f(y)=y^2 depends on x implicitly.
   So, we use the chain rule to get f', which actually stands for d[f(y)]/dx.
   Since d[f(y)]/dx = (df/dy) (dy/dx) = 2y(dy/dx),
   d[y^2/x]/dx = [x*2y(dy/dx)-y^2*1] / (x^2)

   I won't bother explaining d[3*x^5]/dx and d[4*x^3]/dx as they are just polynomials.

   Putting these together, assuming that "cos" is really "cos(y)",
   and I have read the question as intended and not made any mistake,
   | d[x - cos(y)^2 + y^2/x + 3x^5]/dx = d[4x^3]/dx
   | 1 + 2*cos(y)sin(y)(dy/dx) + [x*2y(dy/dx)-y^2*1] / (x^2) + 15*x^4 = 12*x^2

   From this point onward, it is just algebra to isolate (dy/dx) and leave
   everything on the other side of the equation. This is left for you to do.

Q4) tan(5y) - y*sin(x) + 3xy^2 = 9
   d[tan(5y) - y*sin(x) + 3xy^2]/dx = 0

For d[tan(5y)]/dx,
a)  First, recall d[tan(x)]/dx = [sec(x)]^2.
b)  Next, we account for the constant in front of y, using simply the chain rule.
   When we have tan(a*x)/dx for some constant "a", let u=a*x. Clearly, du/dx=a.
   Then, d[tan(ax)]/dx = (d[tan(u)]/du) (du/dx) = a*[sec(a*x)]^2.
c)  Finally, let g(y)=5y. Remember, we want to differentiate w.r.t. x.,
   but we only have y. To make things clear, let z(g,y)=tan(g), g(y)=5y.
   d[z]/dx = (dz/dg)(dg/dy)(dy/dx) = [sec(g)]^2 * 5 (dy/dx) = 5*[sec(5y)]^2(dy/dx).

For y*sin(x)   [don't forget the minus sign later on]
   Use product rule as shown in Q1.
   d[y*sin(x)]/dx = y*d[sin(x)]/dx + (d[y]/dx)*sin(x)
         = y*cos(x) + sin(x)(dy/dx)

For d[3xy^2]/dx, as before...
   d[3xy^2]/dx = 3*{x*d[y^2]/dx + (d[x]/dx)*y^2}
         = 3*{x*2y(dy/dx) + 1*y^2}

Again, I'll leave you to pick up the pieces. The differentiation part is done.
The remaining task is to solve for (dy/dx)....just algebra:O

------
Re: "in 1) where does -3y^2 come from ?"
Ans: I think that looks right. Go through the steps in Q1 carefully.

Re: "in 2) "     "    -5x  "     "    ?"
Ans: Can't comment on this. But if anything, it's on par with Q1 or perhaps even easier. You might be able to work this out on your own, once you get pass Q1.

| For d[x^3*sin(y)]/dx, let f=x^3, g=sin(y). d[f*g]/dx = f(dg/dx)+g(df/dx).
| But g depends on x implicitly, so d[g(y)]/dx = (dg/dy) (dy/dx).
| d[x^3*sin(y)]/dx = x^3*cos(y)(dy/dx)+3*x^2*sin(y)
|
| d[xy]/dx = x(dy/dx)+y using chain rule.


---------- FOLLOW-UP ----------

QUESTION: Josh,
first i'd like to say thanks for responding so fast to my previous questions, as the previous expert i asked had put me off using this for awhile.

questions regarding


1)3xy^2+cosy^2 =2x^3+5


i get upto 6xy dy/dx +3y^2 -2siny cosy =6x^2

where do i go from here

as my answer(book) says

dy/dx = 6x^2 -3y^2/6xy -2y siny^2

your answer was different, confused by this.
quote  (dy/dx) = [2*sin(y)cos(y) + 6*x^2 - 3*y^2]/(6y)


3)x-cosx^2+y^2/x +3x^5= 4x^3

my workings out

1 - (2.cosx-sinx) + (x.2y dy/dx -y^2.1) +15x^4= 12x^2

1 - 2cosx +sinx   +  2xy dy/dx -y^2     +15x^4= 12x^2

What now?

as the answer says  

dy/dx = 12x^4 -15x^6 +yx^2 -2x^3 sin x^2 -x^2 / 2xy     ????

how have the powers gone up,don't i usually subtract? the only thing i had was the denominator.

lastly

4)tan5y-ysinx+3xy^2=9

my workings out are

(sec.5 dy/dx +5y.sec) - (y.cosx +sinx.-1 dy/dx) + 3(x.2y dy/dx + y^2.1)=0

5sec dy/dx (times) sec5y - cosxy -sinx dy/dx  + 6xy dy/dx +3y^2 =0

(5sec^2 5y -sinx +6xy) dy/dx =cosxy- 3y^2

dy/dx =cosxy- 3y^2/5sec^2 5y -sinx +6xy

as you can see i got this,,but my question is, why do i multiply this

5sec dy/dx (times) sec5y to give me this 5sec^2 5y dy/dx

but not this - cosxy(times)-sinx dy/dx to give me this sinx -cosxy dy/dx

there seems to be something i'm missing in the rules, but not quite sure what to ask this question! the answer was found through trial and error.

many thanks,
Richard.

Answer
No problem, Richard.

Yes, my apologies. Please correct the following in my previous post.

Q1 3rd paragraph (last line) "dg/dy" should read
"d[cos(y)^2]/dy = 2*cos(y)*-sin(y)"  NOT "d[cos(y)^2]/dx = 2*cos(y)*-sin(y)"

So, differentiating 3*x*y^2 + [cos(y)]^2 - 2*x^3 - 5 = 0 w.r.t. x
3*[y^2+2xy(dy/dx)] - 2*sin(y)cos(y)(dy/dx) - 6*x^2 = 0
[Note: the first (dy/dx) here was missing previously]

3*y^2 + [6xy-2*sin(y)cos(y)](dy/dx) = 6*x^2
(dy/dx) = [6*x^2 - 3*y^2]/(6xy-sin(2y)) ....[@]

According to you, the answer in the book reads "dy/dx = 6x^2 -3y^2/6xy -2y siny^2"
Yes, I acknowledge that there is a discrepancy at this point, I'm not sure why...
What we got "-2*sin(y)cos(y)" is clearly not the same -2y*[sin(y)]^2
But I am convinced [@] is correct. See if you can spot anything.

Re: Q3
Please note d[cos(y)^2] = 2*cos(y)*-sin(y) (dy/dx)
...there is a multiplication involved between cos and -sin
...it should read -2*sin(y)*cos(y), not 2cos(x)-sin(x)

Another thing you may have overlooked is that there is a division by x^2 involved, when we take d[y^2/x]/dx. For reference, d[y^2/x]/dx = [x*2y(dy/dx)-y^2*1] / (x^2). This most likely would explain why there is a power difference of x^2 in the answer for most terms.

If we pick up from the second last paragraph in Q3 (original post), identifying cos^2 as "[cos(x)]^2",
1 + 2*cos(x)sin(x) + [x*2y(dy/dx)-y^2*1]/(x^2) + 15*x^4 = 12*x^2
x^2 + 2*x^2*cos(y)sin(y) + [x*2y(dy/dx)-y^2*1] + 15*x^6 = 12*x^4
2*x^2*cos(y)sin(y) + [2xy(dy/dx)] = 12*x^4 - 15*x^6 -x^2 +y^2
(dy/dx)= [12*x^4 - 15*x^6 -x^2 +y^2 -2*x^2*sin(x)*cos(x)]/[2xy]

You said the solution in the book reads "dy/dx = 12x^4 -15x^6 +yx^2 -2x^3 sin x^2 -x^2 / 2xy"
....I think "yx^2" is a typo and it should be "y^2"
....again, the difference is between "2*x^2*sin(x)*cos(x)" and "2*x^3*[sin(x)]^2"
....I'm not sure why the book used 2x*[sin(x)]^2 instead of 2*sin(x)*cos(x).


Q4)tan(5y)-y*sin(x)+3xy^2=9

my workings out are
| (sec.5 dy/dx +5y.sec) - (y.cosx +sinx.-1 dy/dx) + 3(x.2y dy/dx + y^2.1)=0
| 5sec dy/dx (times) sec5y - cosxy -sinx dy/dx  + 6xy dy/dx +3y^2 =0
|(5sec^2 5y -sinx +6xy) dy/dx =cosxy- 3y^2
| dy/dx =cosxy- 3y^2/5sec^2 5y -sinx +6xy

Some comments
=============
In line 1: d[y*sin(x)]/dx = y*cos(x)+sin(x)*(dy/dx)....there should not be any minus sign

When you differentiate sec(5y) w.r.t. x, I am guessing that you do not use "sec.5 dy/dx" to say sec(5y)*(dy/dx). I believe you are actually saying sec(5(dy/dx)), am I right?
I think this is the source of the problem. First, dy/dx should not go into the argument of secant. That is, you do not directly replace 5y with 5(dy/dx). There are two problems with this:
1) You later (somehow) call the "5sec" term where the variable is not explicitly identified and turn it into 5*sec(y). When we are dealing with two or more variables (multi-variable calculus), we cannot afford to be slack. The variable must be clearly identified to avoid ambiguity and confusion.
2) You are not really invoking the chain rule.

The safest bet is as I have outlined before (see Q4 in original post),
Let g(y)=5y, z(g,y)=tan(5y).   You can just write g(y) as g if you want, and write z(g,y) implicitly as z.

Then, what you are interested in finding is d[tan(5y)]/dx, same as dz/dx.
Now, invoke the chain rule of differentiation, dz/dx = (dz/dg)(dg/dy)(dy/dx).
Work out each part one by one:
a)  First, for z=tan(g), dz/dg = [sec(g)]^2.
b)  Then, for g=5y, dg/dy = 5.
c)  Finally, for y (an implicit function of x), we have (dy/dx).
So, d[tan(5y)]/dx = [sec(g)]^2 * 5 * (dy/dx) = 5*[sec(5y)]^2 (dy/dx)
Note that throughout this process, the argument (viz., 5y) of secant was never directly replaced by dy/dx. In fact, (dy/dx) only appears in the product expression due to the chain rule.

Having been there myself, I can only suggest to you "don't get sloppy". Follow the safe procedure (assign z=..., g=..., then use the chain rule). Keep up the good work!

Re: "- cosxy(times)-sinx dy/dx to give me this sinx -cosxy dy/dx"
May be I have misintepreted your question at some point.
Just be careful in how you write these things.
-cos(x)*-sin(x)(dy/dx) would be a single product sin(x)cos(x)(dy/dx)
whereas sin(x)-cos(x)*y*(dy/dx) consists of 2 terms (separated by the minus sign).

P.S. I think I have figured the reason for the discrepancy.
I interpreted siny^2 as the square of sin(y).  For this translation, I type [sin(y)]^2.
I believe what you actually meant was sine function with y square as the argument. For this, we will use sin(y^2) from now on, okay?

So, for d[sin(y^2)]/dx, let g=y^2, z=sin(g).
dz/dx = (dz/dg)(dg/dy)(dy/dx)
     = cos(g)*2y(dy/dx)
     = cos(y^2)*2y(dy/dx)

Now, we are happy.
I believe we SOLVED the puzzle with Q1 and Q3 (discrepancy with textbook solution)
It has to do with the way we write sine of y-square, NOT as sin y^2 or [sin(y)]^2 but as sin(y^2).

Basic Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Josh

Expertise

When I work through problems, I like to emphasize concepts which I believe are worth noting. I will try to answer questions in the following areas, but not at the advanced level. Algebra. Sequences & Series. Trigonometry. Functions & Graphs. Coordinate Geometry. Quadratic Polynomials. Exponential & Logarithms. Basic Calculus. Probability, Permutation and Combination. Mathematical Induction. Complex numbers. Physics problems.

Experience

I have worked as a teaching assistant in college. My hope is that more people will share knowledge without boundary, give help without seeking recognition or monetary rewards.

Education/Credentials
Bachelor degree in Engineering Science

©2012 About.com, a part of The New York Times Company. All rights reserved.