# Solving problems using the Average Value function

#### shamieh

##### Active member
The miles per gallon of my car on a recent trip at time t was given by $mpg(t) = 30 + 10sin(t)$ where $0 <= t <= \pi$. Find the average value of $mpg(t)$ over this time interval.

So I'm kind of confused on how to do this. Here is what I have set up, let me know if I'm on the wrong track or not. Thanks in advance.

$\frac{1}{\pi} \int^\pi_0 (30 + 10sin(t)) \, dt$

$\frac{1}{\pi} [30x - 10cos(t)]$ $|^\pi_0$

$\frac{1}{\pi} ( [30\pi + 10] + [+10])$

$\frac{1}{\pi} [30\pi + 20]$

= $\frac{30\pi}{\pi} + \frac{20}{\pi} = \frac{30\pi + 20}{\pi}$

By the way I just completely guessed on how to do this, so this attempt may look idiotic lol. Thanks again.

MHB Math Scholar
This is correct.

#### MarkFL

Staff member
I only have one very minor quibble...in your second line of work, you have an $x$ in your antiderivative when you have integrated with respect to $t$, but I highly suspect this is just a typo.

In your $\LaTeX$ coding, you may precede trigonometric (and other pre-defined) functions with a backslash so that they are not italicized and will not look like a string of variables. For example:

tan(\theta) gives $$\displaystyle tan(\theta)$$

whereas:

\tan(\theta) gives $$\displaystyle \tan(\theta)$$

Also, I highly recommend using the $$\displaystyle \Sigma$$ button on our toolbar to generate MATH tags rather than using the dollar sign tags. The button automatically generates the command \displaystyle which makes certain commands large and look better. Compare the difference:

\$\frac{1}{\pi} \int^\pi_0 (30 + 10\sin(t)) \, dt\$ gives $\frac{1}{\pi} \int^\pi_0 (30 + 10\sin(t)) \, dt$

whereas:

[MATH]\frac{1}{\pi} \int^\pi_0 (30 + 10\sin(t)) \, dt[/MATH] gives $$\displaystyle \frac{1}{\pi} \int^\pi_0 (30 + 10\sin(t)) \, dt$$

#### shamieh

##### Active member
Ahh thank you Mark, I will definitely absorb that advice.

#### shamieh

Hey Mark, sorry to double post. The reason I have been using the $for LaTEx is because it is so convenient to just type rather than using the Sigma button to highlight and then click and then highlight and click... I was wondering is there a ctrl key or some shortcut I can do to just implement latex with that button WITHOUT typing [math every time? Was just curious. #### MarkFL ##### Administrator Staff member Hey Mark, sorry to double post. The reason I have been using the$ for LaTEx is because it is so convenient to just type rather than using the Sigma button to highlight and then click and then highlight and click... I was wondering is there a ctrl key or some shortcut I can do to just implement latex with that button WITHOUT typing [math every time? Was just curious.
What I do is click the button first, and then enter the code (you will find your cursor is conveniently placed at the proper place to begin entering your code). Doing it this way is a bit quicker than typing out the dollar sign tags, and the result is much better looking output that results from the BBCode associated with the MATH tags, i.e., the inclusion of the \displaystyle command. 