We need to find #dy/dx#.
Start off with differentiating both sides.
#d/dx (x^2y+xy^2) = d/dx(3x)#
Since #d/dx(f(x)+g(x)) = d/dx f(x) + d/dx g(x)# :
#d/dx x^2y+ d/dx xy^2 = d/dx 3x#
The right hand side is simpler, so let's do that first.
Given any constant #c#, #d/dx cf(x) = c (d/dx f(x) )#, so:
#d/dx x^2y+ d/dx xy^2 =3 d/dx x#
#d/dx x^2y+ d/dx xy^2 =3 (1)#
#d/dx x^2y+ d/dx xy^2 =3#
For the left hand side, we apply the product rule:
#d/dx(f(x)g(x)) = f(x)d/dx(g(x)) + g(x)d/dx(f(x))#
#d/dx x^2y + d/dx xy^2 =3#
#[x^2(d/dx y) + y(d/dx x^2)] + [x(d/dx y^2) + y^2(d/dx x)] =3#
Differentiating the #x# parts is straightforward:
#[x^2(d/dx y) + y(2x)] + [x(d/dx y^2) + y^2(1)] =3#
When differentiating one variable in terms of another, you have to treat the other variable as a function of the one we are differentiating.
For example: #d/dx(y) = dy/dx = y'#
How this works for more complicated problems uses the chain rule.
For example:
#d/dx y^2#
#d/dx y^2#
#= 2y d/dx y#
#= 2y(dy/dx)#
A "shortcut" is simply "differentiating as normal, then multiplying a #dy/dx# (or whatever other variable you're working with.
Going back to the problem:
#[x^2(d/dx y) + y(2x)] + [x(d/dx y^2) + y^2(1)] =3#
#[x^2(dy/dx) + 2xy] + [2xy(dy/dx) + y^2] =3#
We need to isolate #dy/dx#, so we bring all the #dy/dx# terms to one side, and bring the other terms to the other side:
#x^2(dy/dx) + 2xy(dy/dx) = 3 - 2xy - y^2#
Now we can factor out #dy/dx#.
#(dy/dx)(x^2+2xy)=3 - 2xy - y^2#
#dy/dx=(3 - 2xy - y^2)/(x^2+2xy)#