0

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?

dharmatech
  • 919
  • 2
  • 11
  • 19
  • x[t]^2 + y[t]^2 /. y[t] -> x[t]^2 + 1, and then Simplify[D[%, t]/(2 %) /. x'[t] -> 2]? – BoLe May 01 '13 at 05:32

1 Answers1

6

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.

Jens
  • 97,245
  • 7
  • 213
  • 499