Home » Blog » Find the integral from -π to x of |1/2 + cos t|

# Find the integral from -π to x of |1/2 + cos t|

For , compute the following integral:

Since we are taking the integral of an absolute value, first we want to determine on which intervals is positive and on which it is negative. We have,

Now must consider two cases. First, if , then,

In the other case, that , then,

1. eastlunder says:

Also consider this solution:

Using the additive property we have

*** QuickLaTeX cannot compile formula:
$\int_{-\pi}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt = \int_{-\pi}^{0}\Big|\frac{1}{2}+\cos{t}\Big|\, dt + \int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt,$

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

and applying Thm. 1.19 to the first integral we get

*** QuickLaTeX cannot compile formula:
$\int_{-\pi}^{0}\Big|\frac{1}{2}+\cos{t}\Big|\, dt + \int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt = -\int_{\pi}^{0}\Big|\frac{1}{2}+\cos{(-t)}\Big|\, dt + \int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt$

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

but is an even function and

*** QuickLaTeX cannot compile formula:
\pi > 0

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

so Def. 1.4 yields

*** QuickLaTeX cannot compile formula:
\begin{align*}
-\int_{\pi}^{0}\Big|\frac{1}{2}+\cos{(-t)}\Big|\, dt + \int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt
&=
\underbrace{\int_{0}^{\pi}\Big|\frac{1}{2}+\cos{t}\Big|\, dt}_{\text{Prev. exercise.}} + \int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt=\\
&= \Big(\frac{\pi}{6} + \sqrt{3}\Big) +\int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt.
\end{align*}

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

Again, from the previous exercise we know that the integrand has the property

*** QuickLaTeX cannot compile formula:
$\Big|\frac{1}{2}+\cos{t}\Big| = \begin{cases} \frac{1}{2}+\cos{t} & \text{if } -\frac{2\pi}{3} \leq t \leq \frac{2\pi}{3}\\ -\big(\frac{1}{2}+\cos{t}\big) & \text{if } \frac{2\pi}{3} \leq t \leq \pi \text{ or } -\pi \leq t \leq -\frac{2\pi}{3} \end{cases}$

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

and since we now only have to solve an integral over with

*** QuickLaTeX cannot compile formula:
x \in [0,\pi]

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

we need only worry about . However, because the integrand changes sign mid interval (depending on ) we must split into cases. Thus

*** QuickLaTeX cannot compile formula:
$\int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt = \begin{cases} \int_{0}^{x}\big[\frac{1}{2}+\cos{t}\big]\, dt & \text{if } x \in \big[0,\frac{2\pi}{3}\big]\\ \int_{0}^{\frac{2\pi}{3}}\big[\frac{1}{2}+\cos{t}\big]\, dt - \int_{\frac{2\pi}{3}}^{x}\big[\frac{1}{2}+\cos{t}\big]\, dt & \text{if } x \in \big[\frac{2\pi}{3}, \pi\big] \end{cases}$

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

where the first case gives

*** QuickLaTeX cannot compile formula:
\begin{align*}
\int_{-\pi}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt &= \Big(\frac{\pi}{6} + \sqrt{3}\Big) +\int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt=\\
&= \Big(\frac{\pi}{6} + \sqrt{3}\Big) + \int_{0}^{x}\Big[\frac{1}{2}+\cos{t}\Big]\, dt =\\
&= \Big(\frac{\pi}{6} + \sqrt{3}\Big) + \Big(\frac{x}{2}-0\Big) + (\sin{x}-\sin{0})= \\
&=\frac{\pi}{6} + \sqrt{3} + \frac{x}{2} + \sin{x},
\end{align*}

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37

and the second

*** QuickLaTeX cannot compile formula:
\begin{align*}
\int_{-\pi}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt &=\Big(\frac{\pi}{6} + \sqrt{3}\Big) +\int_{0}^{x}\Big|\frac{1}{2}+\cos{t}\Big|\, dt=\\
&=\Big(\frac{\pi}{6} + \sqrt{3}\Big) + \int_{0}^{\frac{2\pi}{3}}\Big[\frac{1}{2}+\cos{t}\Big]\, dt - \int_{\frac{2\pi}{3}}^{x}\Big[\frac{1}{2}+\cos{t}\Big]\, dt=\\
&=\Big(\frac{\pi}{6} + \sqrt{3}\Big) + \Big(\frac{\pi}{3}+\sin \Big(\frac{2\pi}{3}\Big)\Big) - \Big(\frac{x}{2}-\frac{\pi}{3}+\sin x -\sin \Big(\frac{2\pi}{3}\Big)\Big)=\\
&= \frac{5\pi}{6}+2\sqrt{3}-\frac{x}{2}-\sin x.
\end{align*}

*** Error message:
Cannot connect to QuickLaTeX server: cURL error 60: SSL certificate problem: unable to get local issuer certificate
Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
These links might help in finding solution:
http://wordpress.org/extend/plugins/core-control/
http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
2. mathmath192 says:

Hello, Can you please explain the function (the absolute function) that you have in the 1st line? Why is the function between -2pi/3 and 2pi/3 negative ?

• Dave says:

I think the range of the positve and negative range of the absolute value are the wrong way around

• Jr says:

The calculations are correct but at the top, the cases of absolute value sign are the wrong way around for each range.