👉 Try now NerdPal! Our new math app on iOS and Android
  1. calculators
  2. Weierstrass Substitution

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!
Symbolic mode
Text mode
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

1

Here, we show you a step-by-step solved example of weierstrass substitution. This solution was automatically generated by our smart calculator:

$\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-\frac{1-t^{2}}{1+t^{2}}+\frac{2t}{1+t^{2}}}\frac{2}{1+t^{2}}dt$

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

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

Multiplying the fraction by $-1$

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

Combine fractions with common denominator $1+t^{2}$

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

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

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

Divide fractions $\frac{2}{\frac{2t^{2}+2t}{1+t^{2}}\left(1+t^{2}\right)}$ 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{2\left(1+t^{2}\right)}{\left(2t^{2}+2t\right)\left(1+t^{2}\right)}dt$

Simplify the fraction $\frac{2\left(1+t^{2}\right)}{\left(2t^{2}+2t\right)\left(1+t^{2}\right)}$ by $1+t^{2}$

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

Factor the denominator by $2$

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

Cancel the fraction's common factor $2$

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

Simplifying

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

Factor the polynomial $t^{2}+t$ by it's greatest common factor (GCF): $t$

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

Rewrite the expression $\frac{1}{t^{2}+t}$ inside the integral in factored form

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

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

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

Multiplying polynomials

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

Simplifying

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

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

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

Proceed to solve the system of linear equations

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

Rewrite as a coefficient matrix

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

Reducing the original matrix to a identity matrix using Gaussian Elimination

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

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

$\frac{1}{t}+\frac{-1}{t+1}$
7

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

$\frac{1}{t}+\frac{-1}{t+1}$
8

Expand the integral $\int\left(\frac{1}{t}+\frac{-1}{t+1}\right)dt$ into $2$ integrals using the sum rule for integrals, to then solve each integral separately

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

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

$u=t+1$

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

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

Find the derivative

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

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

$1$
10

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

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

$\int\frac{1}{t}dt+\int\frac{-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)$

$\ln\left|t\right|$
12

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

$\ln\left(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)$

$-\ln\left|u\right|$

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

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

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

$-\ln\left(t+1\right)$
14

Gather the results of all integrals

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

Replace $t$ with the value that we assigned to it in the beginning: $\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|$
16

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$

Final answer to the problem

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

Are you struggling with math?

Access detailed step by step solutions to thousands of problems, growing every day!