# Step-by-step Solution

## Solve the trigonometric integral $\int\frac{1}{2\sin\left(x\right)\cos\left(x\right)}dx$

Go!
1
2
3
4
5
6
7
8
9
0
a
b
c
d
f
g
m
n
u
v
w
x
y
z
.
(◻)
+
-
×
◻/◻
/
÷
2

e
π
ln
log
log
lim
d/dx
Dx
|◻|
=
>
<
>=
<=
sin
cos
tan
cot
sec
csc

asin
acos
atan
acot
asec
acsc

sinh
cosh
tanh
coth
sech
csch

asinh
acosh
atanh
acoth
asech
acsch

### Videos

$\frac{1}{2}\ln\left(\sin\left(x\right)\right)-\frac{1}{4}\ln\left(1+\sin\left(x\right)\right)-\frac{1}{4}\ln\left(-\sin\left(x\right)+1\right)+C_0$

## Step-by-step Solution

Problem to solve:

$\int\frac{1}{2sin\left(x\right)cos\left(x\right)}dx$

Solving method

1

We can solve the integral $\int\frac{1}{2\sin\left(x\right)\cos\left(x\right)}dx$ by applying integration by substitution method (also called U-Substitution). First, we must identify a section within the integral with a new variable (let's call it $u$), which when substituted makes the integral easier. We see that $\sin\left(x\right)$ it's a good candidate for substitution. Let's define a variable $u$ and assign it to the choosen part

$u=\sin\left(x\right)$

Differentiate both sides of the equation $u=\sin\left(x\right)$

$du=\frac{d}{dx}\left(\sin\left(x\right)\right)$

Find the derivative

$\frac{d}{dx}\left(\sin\left(x\right)\right)$

The derivative of the sine of a function is equal to the cosine of that function times the derivative of that function, in other words, if ${f(x) = \sin(x)}$, then ${f'(x) = \cos(x)\cdot D_x(x)}$

$\cos\left(x\right)$
2

Now, in order to rewrite $dx$ in terms of $du$, we need to find the derivative of $u$. We need to calculate $du$, we can do that by deriving the equation above

$du=\cos\left(x\right)dx$
3

Isolate $dx$ in the previous equation

$\frac{du}{\cos\left(x\right)}=dx$

Take the inverse of $\sin\left(x\right)$ on both sides

$\arcsin\left(\sin\left(x\right)\right)=\arcsin\left(u\right)$

Apply the formula: $\arcsin\left(\sin\left(x\right)\right)$$=x x=\arcsin\left(u\right) 4 Rewriting x in terms of u x=\arcsin\left(u\right) Divide fractions \frac{\frac{1}{2u\cos\left(x\right)}}{\cos\left(x\right)} with Keep, Change, Flip: \frac{a}{b}\div c=\frac{a}{b}\div\frac{c}{1}=\frac{a}{b}\times\frac{1}{c}=\frac{a}{b\cdot c} \int\frac{1}{2u\cos\left(x\right)^2}du Rewriting x in terms of \arcsin\left(u\right) \int\frac{1}{2u\cos\left(\arcsin\left(u\right)\right)^2}du Simplify \cos\left(\arcsin\left(u\right)\right) as \sqrt{1-u^2} \int\frac{1}{2u\left(1-u^2\right)}du Solve the product 2u\left(1-u^2\right) \int\frac{1}{u\left(2-2u^2\right)}du Solve the product u\left(2-2u^2\right) \int\frac{1}{2u-2u^{3}}du Factor by the greatest common divisor 2 \int\frac{1}{2\left(u-u^{3}\right)}du Take the constant \frac{1}{2} out of the integral \frac{1}{2}\int\frac{1}{u-u^{3}}du 5 Substituting u, dx and x in the integral and simplify \frac{1}{2}\int\frac{1}{u-u^{3}}du 6 Factor the polynomial u-u^{3} by it's GCF: u \frac{1}{2}\int\frac{1}{u\left(1-u^2\right)}du Calculate the power \sqrt{1} \frac{1}{2}\int\frac{1}{u\left(1+\sqrt{1u^2}\right)\left(\sqrt{1}-\sqrt{1u^2}\right)}du Any expression multiplied by 1 is equal to itself \frac{1}{2}\int\frac{1}{u\left(1+u\right)\left(1-u\right)}du 7 Factor the difference of squares \left(1-u^2\right) as the product of two conjugated binomials \frac{1}{2}\int\frac{1}{u\left(1+u\right)\left(1-u\right)}du 8 Rewrite the fraction \frac{1}{u\left(1+u\right)\left(1-u\right)} in 3 simpler fractions using partial fraction decomposition \frac{1}{u\left(1+u\right)\left(1-u\right)}=\frac{A}{u}+\frac{B}{1+u}+\frac{C}{1-u} 9 Find the values for the unknown coefficients: A, B, C. The first step is to multiply both sides of the equation from the previous step by u\left(1+u\right)\left(1-u\right) 1=u\left(1+u\right)\left(1-u\right)\left(\frac{A}{u}+\frac{B}{1+u}+\frac{C}{1-u}\right) 10 Multiplying polynomials 1=\frac{uA\left(1+u\right)\left(1-u\right)}{u}+\frac{uB\left(1+u\right)\left(1-u\right)}{1+u}+\frac{uC\left(1+u\right)\left(1-u\right)}{1-u} 11 Simplifying 1=A\left(1+u\right)\left(1-u\right)+uB\left(1-u\right)+uC\left(1+u\right) 12 Expand the polynomial 1=A+Au-uA-u^2A+Bu-Bu^2+Cu+Cu^2 13 Assigning values to u we obtain the following system of equations \begin{matrix}1=A&\:\:\:\:\:\:\:(u=0) \\ 1=-2B&\:\:\:\:\:\:\:(u=-1) \\ 1=2C&\:\:\:\:\:\:\:(u=1)\end{matrix} 14 Proceed to solve the system of linear equations \begin{matrix}1A & + & 0B & + & 0C & =1 \\ 0A & - & 2B & + & 0C & =1 \\ 0A & + & 0B & + & 2C & =1\end{matrix} 15 Rewrite as a coefficient matrix \left(\begin{matrix}1 & 0 & 0 & 1 \\ 0 & -2 & 0 & 1 \\ 0 & 0 & 2 & 1\end{matrix}\right) 16 Reducing the original matrix to a identity matrix using Gaussian Elimination \left(\begin{matrix}1 & 0 & 0 & 1 \\ 0 & 1 & 0 & -\frac{1}{2} \\ 0 & 0 & 1 & \frac{1}{2}\end{matrix}\right) 17 The integral of \frac{1}{u\left(1+u\right)\left(1-u\right)} in decomposed fraction equals \frac{1}{2}\int\left(\frac{1}{u}+\frac{-\frac{1}{2}}{1+u}+\frac{\frac{1}{2}}{1-u}\right)du 18 Expand the integral \int\left(\frac{1}{u}+\frac{-\frac{1}{2}}{1+u}+\frac{\frac{1}{2}}{1-u}\right)du \frac{1}{2}\int\frac{1}{u}du+\frac{1}{2}\int\frac{-\frac{1}{2}}{1+u}du+\frac{1}{2}\int\frac{\frac{1}{2}}{1-u}du 19 We can solve the integral \int\frac{-\frac{1}{2}}{1+u}du by applying integration by substitution method (also called U-Substitution). First, we must identify a section within the integral with a new variable (let's call it v), which when substituted makes the integral easier. We see that 1+u it's a good candidate for substitution. Let's define a variable v and assign it to the choosen part v=1+u Differentiate both sides of the equation v=1+u dv=\frac{d}{du}\left(1+u\right) Find the derivative \frac{d}{du}\left(1+u\right) The derivative of a sum of two functions is the sum of the derivatives of each function \frac{d}{du}\left(1\right)+\frac{d}{du}\left(u\right) The derivative of the constant function (1) is equal to zero \frac{d}{du}\left(u\right) The derivative of the linear function is equal to 1 1 20 Now, in order to rewrite du in terms of dv, we need to find the derivative of v. We need to calculate dv, we can do that by deriving the equation above dv=du 21 Substituting v and du in the integral and simplify \frac{1}{2}\int\frac{1}{u}du+\frac{1}{2}\int\frac{-\frac{1}{2}}{v}dv+\frac{1}{2}\int\frac{\frac{1}{2}}{1-u}du The integral of the inverse of the lineal function is given by the following formula, \displaystyle\int\frac{1}{x}dx=\ln(x) \frac{1}{2}\ln\left(u\right) 22 The integral \frac{1}{2}\int\frac{1}{u}du results in: \frac{1}{2}\ln\left(u\right) \frac{1}{2}\ln\left(u\right) The integral of the inverse of the lineal function is given by the following formula, \displaystyle\int\frac{1}{x}dx=\ln(x) -\frac{1}{4}\ln\left(v\right) Replace v with the value that we assigned to it in the beginning: 1+u -\frac{1}{4}\ln\left(1+u\right) Replace u with the value that we assigned to it in the beginning: \sin\left(x\right) -\frac{1}{4}\ln\left(1+\sin\left(x\right)\right) 23 The integral \frac{1}{2}\int\frac{-\frac{1}{2}}{v}dv results in: -\frac{1}{4}\ln\left(1+\sin\left(x\right)\right) -\frac{1}{4}\ln\left(1+\sin\left(x\right)\right) Apply the formula: \int\frac{n}{ax+b}dx$$=\frac{n}{a}\ln\left(ax+b\right)$, where $a=-1$, $b=1$, $x=u$ and $n=\frac{1}{2}$

$-\frac{1}{4}\ln\left(-u+1\right)$
24

The integral $\frac{1}{2}\int\frac{\frac{1}{2}}{1-u}du$ results in: $-\frac{1}{4}\ln\left(-u+1\right)$

$-\frac{1}{4}\ln\left(-u+1\right)$
25

Gather the results of all integrals

$\frac{1}{2}\ln\left(u\right)-\frac{1}{4}\ln\left(1+\sin\left(x\right)\right)-\frac{1}{4}\ln\left(-u+1\right)$

$\frac{1}{2}\ln\left(\sin\left(x\right)\right)-\frac{1}{4}\ln\left(1+\sin\left(x\right)\right)-\frac{1}{4}\ln\left(-\sin\left(x\right)+1\right)$
26

Replace $u$ with the value that we assigned to it in the beginning: $\sin\left(x\right)$

$\frac{1}{2}\ln\left(\sin\left(x\right)\right)-\frac{1}{4}\ln\left(1+\sin\left(x\right)\right)-\frac{1}{4}\ln\left(-\sin\left(x\right)+1\right)$
27

As the integral that we are solving is an indefinite integral, when we finish integrating we must add the constant of integration $C$

$\frac{1}{2}\ln\left(\sin\left(x\right)\right)-\frac{1}{4}\ln\left(1+\sin\left(x\right)\right)-\frac{1}{4}\ln\left(-\sin\left(x\right)+1\right)+C_0$

$\frac{1}{2}\ln\left(\sin\left(x\right)\right)-\frac{1}{4}\ln\left(1+\sin\left(x\right)\right)-\frac{1}{4}\ln\left(-\sin\left(x\right)+1\right)+C_0$
$\int\frac{1}{2sin\left(x\right)cos\left(x\right)}dx$

### Main topic:

Trigonometric Integrals

~ 0.36 s