Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
x[t]^2 + y[t]^2 /. y[t] -> x[t]^2 + 1, and then Simplify[D[%, t]/(2 %) /. x'[t] -> 2]? – BoLe May 1 '13 at 5:32
up vote 5 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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