Calculus based word problems Alright I need help understanding word problems that ask for min or max.  I know that Im supposed to use the derivative but my problem is figuring out the initial formulas.  And this is for almost all word problems.  I draw the pictures, set up variables, but from that point on Im as lost as an adult at disney world.  I will give an example:A hiker starting at a point P on a straight road walks east towards point Q, which is on the road and 3 kilometers from point P. Two kilometers due north of point Q is a cabin. The hiker will walk down the road for a while, at a pace of 8 kilometers per hour. At some point Z between P and Q, the hiker leaves the road and makes a straight line towards the cabin through the woods, hiking at a pace of 3 kilometers per hour, as pictured below. In order to minimize the time to go from P to Z to the cabin, where should the hiker turn into the forest?  Im not looking for the answer on here just help in understanding the process better.  I have been sifting through notes and videos and nothing is helping, not even my teacher at this point.  Can anyone help an old guy figure this out?
 A: Okay.  First we need to decide just what the function is supposed to tell us.  In particular what is the input and what is being calculated from the input.  In this case we are calculating how much time it takes to get to the cabin and we are calculating it from what point on the road he turns off.  So f maps: points of the road $\rightarrow$ total time. 
Now how do we represent points on the road.  The first point is P.  We'll call that 0 and the last point is Q.  We'll call that 3 (because it is 3 kilometers from p.  At some point x, 0<= x <= 3.  The hiker will turn off the road.  So how do we relate the to time spent? We want $f(x) = something$.  Well, The hiker walks x kilometers at 8 kph and then walks the rest of the distance through the woods at 3 kph.  What is the rest of the distance?  Well, It's off on an angle.  The path is the hypontenuse of a right triangle.  The side along the road is from x to 3.  That is 3-x long.  The side from Q to the cabin is 2 km long.  So the hiked path is $\sqrt {(3-x)^2 + 2^2} $.  
So walking along the road is x km, and walking through the woods is $\sqrt {(3-x)^2 + 2^2} $ kilometers.  So how do we figure out the time spent walking each part.
Well how does speed, distance and time relate?  speed x time = distance.  So if we want time; time = distance / speed.
So the time spent is x kilometers at 8 kph = x/8 and $\sqrt {(3-x)^2 + 2^2} $ kilometers at 3 kph is $\sqrt {(3-x)^2 + 2^2} $ /3.  So the total time is:
$f(x) = time = \frac x 8 + \frac{\sqrt {(3-x)^2 + 2^2} }{3 }$.  You must find the point that yields the minimum of that function.
