How to find the maximum distance between two paths over a time interval (diff eqn) AP Calc Question Alice and Bob go for a jog in the same direction along a straight path. For $0\leq t \leq20$, Alice’s velocity at time t is given by $A(t)=\frac{6010}{t^2-3t+50.5}$ meters per minute, and Bob’s velocity at time t is given by $B(t)=8.5t^3e^{-0.45t}$ meters per minute. Both of these velocities are always positive. Alice is 12 meters ahead of Bob at time $t=0$, and she remains ahead of Bob for $0\leq t\leq 20$.
What is the maximum distance between Alice and Bob over the time interval $0\leq t \leq 20$?
The answer is $d=1413.23$ when $t=4.58$.
I'm confused on how to get this answer...
I did $\int_0^{20} \frac{6010}{t^2-3t+50.5} - \int_0^{20} 8.5t^3e^{-0.45t}$
$\int_0^{20}\frac{6010}{t^2-3t+50.5} =1232.323$
$\int_0^{20} 8.5t^3e^{-0.45t}=1217.313$
and got $1232.323-1217.313=15.01=d$
I thought that the distance between Alice and Bob is $\int A(t)-\int(B(t)$ so I'm confused where I went wrong.
How can I solve this?
 A: You've calculated the overall difference in the distances they traveled between $t=0$ and $t=20$, not the difference at a specific point in time. What we need is the difference as a function of $t$.
We're given $A(t)=\frac{6010}{t^2-3t+50.5}$ meters per minute, and $B(t)=8.5t^3e^{-0.45t}$. Since we know Alice is ahead of Bob at any given time, and we know that at $t = 0$ Alice is $12$ meters ahead of Bob, we can write our distance function as follows:
$$ d(t) = 12 + \int_0^t A(\tau) - B(\tau) d\tau $$
This is similar to what you wrote, except you integrated from $\tau=0$ to $\tau=20$. Now, the key to this problem is that we want to maximize that distance, so all we have to do is differentiate and set the derivative equal to $0$, which is very easy with the Fundamental Theorem of Calculus:
$$ \frac{d}{dt} d(t) = \frac{d}{dt} \left( 12 + \int_0^t A(\tau) - B(\tau) d\tau \right) = A(t) - B(t)$$
$$ \Rightarrow A(t) - B(t) = 0 $$
$$ \Rightarrow A(t) = B(t) $$
$$ \Rightarrow \frac{6010}{t^2 - 3t + 50.5} = 8.5t^3e^{-0.45t} . $$
We can use a calculator to solve numerically and find that $A(t) = B(t)$ at $t \approx 4.584$ or $t \approx 16.715$. These are the local extrema on the interval $t\in [0,20]$, so plug those values back into $d(t)$, plus check the endpoints at $t = 0$ and $t = 20$, and one of those four values will be your maximum distance.
