Saturday, 5 June 2021

Hands On With The Integral Calculator

I watched a YouTube video today featuring the following integration result:$$\int_0^{2\pi} \frac{1}{3+2\sin(x)} \mathrm{d}x=\frac{2\pi}{\sqrt{5}}$$The method of solving it involved complex analysis involving contour integrals, L'Hospital's Rule, and the Residue Theorem. Here is a link to the video. It is well explained but I was left wondering if there is a way to solve it that does not require the use of complex numbers.

I decided to use a recently discovered resource:


I entered this result and then copied the result, which is shown below:

Problem:
12sin(x)+3dx
Prepare for tangent half-angle substitution (Weierstrass substitution):
=14tan(x2)tan2(x2)+1+3dx
Substitute u=tan(x2)  dudx=sec2(x2)2 (steps)  dx=2sec2(x2)du =2u2+1du:
=213u2+4u+3 du

Now solving:
13u2+4u+3du
Complete the square:
=1(3u+23)2+53du
Substitute v=3u+25  dvdu=35 (steps)  du=53dv:
=53(5v23+53)dv
Simplify:
=151v2+1dv

Now solving:
1v2+1dv
This is a standard integral:
=arctan(v)

Plug in solved integrals:
151v2+1dv
=arctan(v)5
Undo substitution v=3u+25:
=arctan(3u+25)5

Plug in solved integrals:
213u2+4u+3 du
=2arctan(3u+25)5
Undo substitution u=tan(x2):
=2arctan(3tan(x2)+25)5

The problem is solved:
12sin(x)+3 dx
=2arctan(3tan(x2)+25)5+C

*****************************************

The definite integral result is then given in LaTeX format: \( \dfrac{2{\pi}}{\sqrt{5}} \). 

Unfortunately, it doesn't appear possible to export the actual steps in LaTex but the copy and paste operation seems to have worked well enough, the elements are editable and the provided links are functional. However, the HTML is an absolute nightmare. It makes the page slow to load and there's no way to remove the coloured vertical bars on the left.

The site also provides a graph of the integral. See Figure 1.


Figure 1

There is a Derivative Calculator as well. I wasn't familiar with the Weierstrass substitution but I won't go into that in this post. It deserves a post of its own which I'll hopefully get around to doing in the near future. 

I thought I'd experiment with applying the MathPix Snipping Tool to the Integral Calculator. I wrote about the former in an eponymous post on March 31st 2021. Here are the results for the initial snipping (with a little tinkering to remove excessive white space):$$\int \frac{1}{2 \sin (x)+3} \mathrm{~d} x$$Prepare for tangent half-angle substitution (Weierstrass substitution):$$\begin{aligned}&=\int \frac{1}{\frac{4 \tan \left(\frac{x}{2}\right)}{\tan ^{2}\left(\frac{x}{2}\right)+1}+3} \mathrm{~d} x \\\text { Substitute } u=\tan \left(\frac{x}{2}\right) \longrightarrow \frac{\mathrm{d} u}{\mathrm{~d} x} &=\frac{\sec ^{2}\left(\frac{x}{2}\right)}{2}(\text { steps }) \longrightarrow \mathrm{d} x=\frac{2}{\sec ^{2}\left(\frac{x}{2}\right)} \mathrm{d} u=\frac{2}{u^{2}+1} \mathrm{~d} u: \\
&=2 \int \frac{1}{3 u^{2}+4 u+3} \mathrm{~d} u
\end{aligned}$$Now solving:$$\int \frac{1}{3 u^{2}+4 u+3} \mathrm{~d} u$$Complete the square:$$\begin{array}{c}
=\int \frac{1}{\left(\sqrt{3} u+\frac{2}{\sqrt{3}}\right)^{2}+\frac{5}{3}} \mathrm{~d} u \\
\text { Substitute } v=\frac{3 u+2}{\sqrt{5}} \longrightarrow \frac{\mathrm{d} v}{\mathrm{~d} u}=\frac{3}{\sqrt{5}}(\text { steps }) \longrightarrow \mathrm{d} u=\frac{\sqrt{5}}{3} \mathrm{~d} v \text { : }


\end{array}$$I only snipped the initial part of the steps. The reproduction from the original page is perfect but I would have set the initial LaTeX out differently. However, the result is editable and thus can be tweaked if desired. An alternative is to produce a PNG but that of course is not then editable. I'm currently using the free version of MathPix Snipping Tool that allows for 50 snips per month which is more than sufficient for casual personal use.

No comments:

Post a Comment