Weierstrass Substitution Calculator

Get detailed solutions to your math problems with our Weierstrass Substitution step-by-step calculator. Practice your math skills and learn step by step with our math solver. Check out all of our online calculators here!

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

Difficult Problems

1

Solved example of weierstrass substitution

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

We can solve the integral $\int\frac{1}{1-\cos\left(x\right)+\sin\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)$
3

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

Substituting in the original integral we get

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

Combine $1-\left(\frac{1-t^{2}}{1+t^{2}}\right)+\frac{2t}{1+t^{2}}$ in a single fraction

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

Multiplying fractions

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

Add fraction's numerators with common denominators: $\frac{2t+1+t^{2}}{1+t^{2}}$ and $\frac{-\left(1-t^{2}\right)}{1+t^{2}}$

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

Simplify the fraction by $1+t^{2}$

$\int\frac{2}{2t^{2}+2t}dt$
5

Simplifying

$\int\frac{2}{2t^{2}+2t}dt$
6

Factor by the greatest common divisor $2$

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

Simplifying

$\int\frac{1}{t^{2}+t}dt$
8

Factoring by $t$

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

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

$\frac{1}{t\left(t+1\right)}=\frac{A}{t}+\frac{B}{t+1}$
10

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

$1=t\left(t+1\right)\left(\frac{A}{t}+\frac{B}{t+1}\right)$
11

Multiplying polynomials

$1=\frac{tA\left(t+1\right)}{t}+\frac{tB\left(t+1\right)}{t+1}$
12

Simplifying

$1=A\left(t+1\right)+tB$
13

Expand the polynomial

$1=At+A+tB$
14

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

$\begin{matrix}1=A&\:\:\:\:\:\:\:(t=0) \\ 1=-B&\:\:\:\:\:\:\:(t=-1)\end{matrix}$
15

Proceed to solve the system of linear equations

$\begin{matrix}1A & + & 0B & =1 \\ 0A & - & 1B & =1\end{matrix}$
16

Rewrite as a coefficient matrix

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

Reducing the original matrix to a identity matrix using Gaussian Elimination

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

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

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

The integral of the sum of two or more functions is equal to the sum of their integrals

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

The integral of the inverse of the lineal function is given by the following formula, $\displaystyle\int\frac{1}{x}dx=\ln(x)$

$\ln\left|t\right|$
20

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

$\ln\left|t\right|$

The integral of a constant by a function is equal to the constant multiplied by the integral of the function

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

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

$-\ln\left|t+1\right|$
21

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

$-\ln\left|t+1\right|$
22

Gather the results of all integrals

$\ln\left|t\right|-\ln\left|t+1\right|$
23

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

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

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

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

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