For speeds between 40 and 65 miles per hour, a truck gets 480/x miles per gallon when driven at a constant speed of x miles per hour. Diesel gasoline costs $2.23 per gallon, and the driver is paid $15.10 per hour. What is the most economical constant speed between 40 and 65 miles per hour at which to drive the truck?

I would just like to know if I calculated this right...thanks!

D(S)=P/S

C(S) ?= G/(480/S)

C(48) ?= G/(480/48)

C(48) ?= G/10

At 10 MPG, each mile costs 1/10 of a gallon of gas

C(S)=SG/480

F(S)=P/S+SG/480

F'(S)= -P/S^2+G/480

P/S = PS^(-1), DS/DY(PS^(-1))=-1PS^(-2)

DS/DY(SG/480)=G/480

Min[F'(S)] @ 0=-P/S^2+G/480, solved for S

P/S^2 = G/480

S^2/P = 480/G

S^2 = 480P/G

S=|SQRT(480P/G)

For P=15.10 and G=2.23, we get S=SQRT(480*15.1/2.23)= ~57.011 MPG.