Here's an exercise from a calculus text by Larson and Edwards:

Find the rate of change of the distance between the origin and a moving point on the graph of $y = x^2 + 1$ if $dx/dt = 2$ centimeters per second.

Here's one way to solve it:

eq1 = d[t]^2 == x[t]^2 + y[t]^2;
eq2 = y[t] == x[t]^2 + 1;
{eq1, D[eq1, t], eq2, D[eq2, t], x'[t] == 2};
Reduce[%, {d'[t], d[t], y'[t], y[t]}]

Is there another way to solve it that might be considered more idiomatic?

  • $\begingroup$ x[t]^2 + y[t]^2 /. y[t] -> x[t]^2 + 1, and then Simplify[D[%, t]/(2 %) /. x'[t] -> 2]? $\endgroup$ – BoLe May 1 '13 at 5:32

The distance is $\sqrt{x^2+y^2}$, and the rate of change is the total derivative with respect to time which can be done as follows:

Clear[x, y, t];
 y = x^2 + 1;
Simplify[Dt[Sqrt[x^2 + y^2]] /. Dt[x] -> 2]

(* ==> (6 x + 4 x^3)/Sqrt[1 + 3 x^2 + x^4] *)

Here I'm using the total derivative Dt instead of the simple D because Dt automatically assumes that all non-constant symbols are functions of t by default, so I don't have to write that differentiation variable explicitly.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.