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

Final Answer

$-\frac{1}{2}\ln\left(1+\tan\left(\frac{x}{2}\right)\right)+\frac{1}{2}\ln\left(\tan\left(\frac{x}{2}\right)\right)-\frac{1}{2}\ln\left(-\tan\left(\frac{x}{2}\right)+1\right)+C_0$
Got a different answer? Try our new Answer Assistant!

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 the method Weierstrass substitution (also known as tangent half-angle substitution) which converts an integral of trigonometric functions into a rational function of $t$ by setting the substitution

$t=\tan\left(\frac{x}{2}\right)$
2

Hence

$\sin x=\frac{2t}{1+t^{2}},\:\cos x=\frac{1-t^{2}}{1+t^{2}},\:\mathrm{and}\:\:dx=\frac{2}{1+t^{2}}dt$
3

Substituting in the original integral we get

$\int\frac{1}{2\left(\frac{2t}{1+t^{2}}\right)\left(\frac{1-t^{2}}{1+t^{2}}\right)}\frac{2}{1+t^{2}}dt$

Multiplying fractions $\frac{2t}{1+t^{2}} \times \frac{1-t^{2}}{1+t^{2}}$

$\int\frac{1}{2\left(\frac{2t\left(1-t^{2}\right)}{\left(1+t^{2}\right)\left(1+t^{2}\right)}\right)}\frac{2}{1+t^{2}}dt$

When multiplying two powers that have the same base ($1+t^{2}$), you can add the exponents

$\int\frac{1}{2\left(\frac{2t\left(1-t^{2}\right)}{\left(1+t^{2}\right)^2}\right)}\frac{2}{1+t^{2}}dt$

Multiplying the fraction by $2$

$\int\frac{1}{\frac{4t\left(1-t^{2}\right)}{\left(1+t^{2}\right)^2}}\frac{2}{1+t^{2}}dt$

Divide fractions $\frac{1}{\frac{4t\left(1-t^{2}\right)}{\left(1+t^{2}\right)^2}}$ with Keep, Change, Flip: $a\div \frac{b}{c}=\frac{a}{1}\div\frac{b}{c}=\frac{a}{1}\times\frac{c}{b}=\frac{a\cdot c}{b}$

$\int\frac{\left(1+t^{2}\right)^2}{4t\left(1-t^{2}\right)}\frac{2}{1+t^{2}}dt$

A binomial squared (sum) is equal to the square of the first term, plus the double product of the first by the second, plus the square of the second term. In other words: $(a+b)^2=a^2+2ab+b^2$

  • Square of the first term: $\left(1\right)^2 = 1^2$
  • Double product of the first by the second: $2\left(1\right)\left(t^{2}\right) = 2\cdot 1t^{2}$
  • Square of the second term: $\left(t^{2}\right)^2 = \left(t^{2}\right)^2$

$\int\frac{1+2t^{2}+t^{4}}{4t-4t^{3}}\frac{2}{1+t^{2}}dt$

Multiplying fractions $\frac{1+2t^{2}+t^{4}}{4t-4t^{3}} \times \frac{2}{1+t^{2}}$

$\int\frac{2\left(1+2t^{2}+t^{4}\right)}{\left(4t-4t^{3}\right)\left(1+t^{2}\right)}dt$
4

Simplifying

$\int\frac{2\left(1+2t^{2}+t^{4}\right)}{\left(4t-4t^{3}\right)\left(1+t^{2}\right)}dt$
5

Take out the constant $2$ from the integral

$2\int\frac{1+2t^{2}+t^{4}}{\left(4t-4t^{3}\right)\left(1+t^{2}\right)}dt$
6

Factor the polynomial $\left(4t-4t^{3}\right)$ by it's GCF: $4t$

$2\int\frac{1+2t^{2}+t^{4}}{4t\left(1-t^2\right)\left(1+t^{2}\right)}dt$

Calculate the power $\sqrt{1}$

$2\int\frac{1+2t^{2}+t^{4}}{4t\left(1+\sqrt{1t^2}\right)\left(1+t^{2}\right)\left(\sqrt{1}-\sqrt{1t^2}\right)}dt$

Any expression multiplied by $1$ is equal to itself

$2\int\frac{1+2t^{2}+t^{4}}{4t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}dt$
7

Factor the difference of squares $\left(1-t^2\right)$ as the product of two conjugated binomials

$2\int\frac{1+2t^{2}+t^{4}}{4t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}dt$

$2\left(\frac{1}{4}\right)\int\frac{1+2t^{2}+t^{4}}{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}dt$

Divide $1$ by $4$

$2\cdot \frac{1}{4}\int\frac{1+2t^{2}+t^{4}}{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}dt$

Multiply $2$ times $\frac{1}{4}$

$\frac{1}{2}\int\frac{1+2t^{2}+t^{4}}{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}dt$
8

Take the constant $\frac{1}{4}$ out of the integral

$\frac{1}{2}\int\frac{1+2t^{2}+t^{4}}{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}dt$
9

Rewrite the fraction $\frac{1+2t^{2}+t^{4}}{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}$ in $4$ simpler fractions using partial fraction decomposition

$\frac{1+2t^{2}+t^{4}}{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}=\frac{A}{t}+\frac{B}{1+t}+\frac{Ct+D}{1+t^{2}}+\frac{F}{1-t}$
10

Find the values for the unknown coefficients: $A, B, C, D, F$. The first step is to multiply both sides of the equation from the previous step by $t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)$

$1+2t^{2}+t^{4}=t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)\left(\frac{A}{t}+\frac{B}{1+t}+\frac{Ct+D}{1+t^{2}}+\frac{F}{1-t}\right)$
11

Multiplying polynomials

$1+2t^{2}+t^{4}=\frac{tA\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}{t}+\frac{tB\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}{1+t}+\frac{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)\left(Ct+D\right)}{1+t^{2}}+\frac{tF\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}{1-t}$
12

Simplifying

$1+2t^{2}+t^{4}=A\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)+tB\left(1+t^{2}\right)\left(1-t\right)+t\left(1+t\right)\left(1-t\right)\left(Ct+D\right)+tF\left(1+t\right)\left(1+t^{2}\right)$
13

Expand the polynomial

$1+2t^{2}+t^{4}=A+At+t^{2}A+t^{3}A-tA-t^2A-t^{3}A-t^{4}A+Bt+Bt^{3}-t^2B-t^{4}B+t^2C-tCt^{3}+D\left(t-t^{3}\right)+\left(Ft+Ft^2\right)\left(1+t^{2}\right)$
14

Assigning values to $t$ we obtain the following system of equations

$\begin{matrix}1=A&\:\:\:\:\:\:\:(t=0) \\ 4=-4B&\:\:\:\:\:\:\:(t=-1) \\ 4=4F&\:\:\:\:\:\:\:(t=1) \\ 25=-15A-10B-12C-6D+30F&\:\:\:\:\:\:\:(t=2) \\ 25=-15A-30B-12C+6D+10F&\:\:\:\:\:\:\:(t=-2)\end{matrix}$
15

Proceed to solve the system of linear equations

$\begin{matrix}1A & + & 0B & + & 0C & + & 0D & + & 0F & =1 \\ 0A & - & 4B & + & 0C & + & 0D & + & 0F & =4 \\ 0A & + & 0B & + & 0C & + & 0D & + & 4F & =4 \\ -15A & - & 10B & - & 12C & - & 6D & + & 30F & =25 \\ -15A & - & 30B & - & 12C & + & 6D & + & 10F & =25\end{matrix}$
16

Rewrite as a coefficient matrix

$\left(\begin{matrix}1 & 0 & 0 & 0 & 0 & 1 \\ 0 & -4 & 0 & 0 & 0 & 4 \\ 0 & 0 & 0 & 0 & 4 & 4 \\ -15 & -10 & -12 & -6 & 30 & 25 \\ -15 & -30 & -12 & 6 & 10 & 25\end{matrix}\right)$
17

Reducing the original matrix to a identity matrix using Gaussian Elimination

$\left(\begin{matrix}1 & 0 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 1\end{matrix}\right)$
18

The integral of $\frac{1+2t^{2}+t^{4}}{t\left(1+t\right)\left(1+t^{2}\right)\left(1-t\right)}$ in decomposed fraction equals

$\frac{1}{2}\int\left(\frac{-1}{1+t}+\frac{1}{t}+\frac{1}{1-t}\right)dt$
19

Expand the integral $\int\left(\frac{-1}{1+t}+\frac{1}{t}+\frac{1}{1-t}\right)dt$ using the sum rule for integrals

$\frac{1}{2}\int\frac{-1}{1+t}dt+\frac{1}{2}\int\frac{1}{t}dt+\frac{1}{2}\int\frac{1}{1-t}dt$
20

We can solve the integral $\int\frac{-1}{1+t}dt$ 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 $1+t$ it's a good candidate for substitution. Let's define a variable $u$ and assign it to the choosen part

$u=1+t$

Differentiate both sides of the equation $u=1+t$

$du=\frac{d}{dt}\left(1+t\right)$

Find the derivative

$\frac{d}{dt}\left(1+t\right)$

The derivative of a sum of two functions is the sum of the derivatives of each function

$\frac{d}{dt}\left(1\right)+\frac{d}{dt}\left(t\right)$

The derivative of the constant function ($1$) is equal to zero

$\frac{d}{dt}\left(t\right)$

The derivative of the linear function is equal to $1$

$1$
21

Now, in order to rewrite $dt$ 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=dt$
22

Substituting $u$ and $dt$ in the integral and simplify

$\frac{1}{2}\int\frac{-1}{u}du+\frac{1}{2}\int\frac{1}{t}dt+\frac{1}{2}\int\frac{1}{1-t}dt$

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)$

Replace $u$ with the value that we assigned to it in the beginning: $1+t$

$-\frac{1}{2}\ln\left(1+t\right)$
23

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

$-\frac{1}{2}\ln\left(1+t\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}{2}\ln\left(t\right)$
24

The integral $\frac{1}{2}\int\frac{1}{t}dt$ results in: $\frac{1}{2}\ln\left(t\right)$

$\frac{1}{2}\ln\left(t\right)$

Apply the formula: $\int\frac{n}{ax+b}dx$$=\frac{n}{a}\ln\left(ax+b\right)$, where $a=-1$, $b=1$, $x=t$ and $n=1$

$-\frac{1}{2}\ln\left(-t+1\right)$
25

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

$-\frac{1}{2}\ln\left(-t+1\right)$
26

Gather the results of all integrals

$-\frac{1}{2}\ln\left(1+t\right)+\frac{1}{2}\ln\left(t\right)-\frac{1}{2}\ln\left(-t+1\right)$
27

Replace $t$ with the value that we assigned to it in the beginning: $\tan\left(\frac{x}{2}\right)$

$-\frac{1}{2}\ln\left(1+\tan\left(\frac{x}{2}\right)\right)+\frac{1}{2}\ln\left(\tan\left(\frac{x}{2}\right)\right)-\frac{1}{2}\ln\left(-\tan\left(\frac{x}{2}\right)+1\right)$
28

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(1+\tan\left(\frac{x}{2}\right)\right)+\frac{1}{2}\ln\left(\tan\left(\frac{x}{2}\right)\right)-\frac{1}{2}\ln\left(-\tan\left(\frac{x}{2}\right)+1\right)+C_0$

Final Answer

$-\frac{1}{2}\ln\left(1+\tan\left(\frac{x}{2}\right)\right)+\frac{1}{2}\ln\left(\tan\left(\frac{x}{2}\right)\right)-\frac{1}{2}\ln\left(-\tan\left(\frac{x}{2}\right)+1\right)+C_0$
SnapXam A2
Answer Assistant

beta
Got another answer? Verify it!

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

Tips on how to improve your answer: