21

I have an equation which is

K^(1/2)*L^(1/2)-(K+L) = 24

but I don't know how to do implicit differentiation to find dK/dL because I only know how to do the normal differentiation and the partial one.

Can anyone help? Thanks much!

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Brittany
  • 211
  • 1
  • 2
  • 3

5 Answers5

24

Dt[], the total derivative, does what you're looking for.

Dt[K^(1/2)*L^(1/2)-(K+L)==24,L]
-1+Sqrt[K]/(2 Sqrt[L])-Dt[K,L]+(Sqrt[L] Dt[K,L])/(2 Sqrt[K])==0
Solve[%,Dt[K,L]]
{{Dt[K,L]->(Sqrt[K] (Sqrt[K]-2 Sqrt[L]))/((2 Sqrt[K]-Sqrt[L]) Sqrt[L])}}
Mark Adler
  • 4,949
  • 1
  • 22
  • 37
  • 1
    would you also use Dt to handle a derivative of a piecewise function that has some part that is defined by a numerical approximation (FindRoot) and so in order to take the derivative we would require to use the implicit function theorem for that part? Like in here:https://mathematica.stackexchange.com/questions/165472/implicit-function-derivative-of-piecewise-function-that-has-a-findroot-in-one-o – Laura K Feb 09 '18 at 15:32
16

Finally, ImplicitD is introduced in v13.1:

ImplicitD[K^(1/2)*L^(1/2) - (K + L) == 24, K, L]

enter image description here

xzczd
  • 65,995
  • 9
  • 163
  • 468
9

enter image description here enter image description here

With k = k(L) we can write:

f[L_, k_] = Sqrt[k] Sqrt[L] - (k + L) - 24;
df = -D[f[L, k], L]/D[f[L, k], k] // Simplify

enter image description here

8

To do this, you must use k as a function of L. Where it's wise to use lower case k.

Note that K is a default generic name for a summation index in a symbolic sum.

eqn = k[L]^(1/2)*L^(1/2) - (k[L] + L) == 24
Solve[D[eqn, L], k'[L]]

{{Derivative[1][k][L] -> ((2 Sqrt[L] - Sqrt[k[L]]) Sqrt[k[L]])/( Sqrt[L] (Sqrt[L] - 2 Sqrt[k[L]]))}}

Feyre
  • 8,597
  • 2
  • 27
  • 46
5

Here is a simple method I use. The following module performs implicit differentiation of an equation of two variables in a conventional format, i.e., with independent variable of the form x (or some other symbol), and dependent variable of the form y (or some other symbol). It converts the dependent variable to the form f [x] and calculates the derivative f' [x] if it exists, and then converts the symbols back to the input format and outputs the solution.

implicitD[lhs_, rhs_, indVar_, depVar_] :=
 Module[{ls, rs, f, R},
  ls = lhs /. depVar -> f[indVar];
  rs = rhs /. depVar -> f[indVar];
  R = Solve[D[ls, indVar] == D[rs, indVar], f'[indVar]][[1, 1]];
  R /. {f[indVar] -> depVar, f'[indVar] -> depVar'}
  ]

For example, to differentiate 3(x^2 + y^2)^2 == 100 x y, use module as follows:

implicitD[3(x^2 + y^2)^2, 100 x y, x, y]

Returns:

y' -> (-3x^3 + 25y - 3x y^2)/(-25x + 3x^2 y + 3y^3)

For your question: differentiate: K^(1/2)*L^(1/2) - (K + L) Use the same method:

implicitD[K^(1/2)*L^(1/2) - (K + L), 24, L, K]

Your result should look like this image:

outputEquation