Post Reply 
(35S) Quick integration
11-18-2022, 04:59 PM
Post: #21
RE: (35S) Quick integration
(11-16-2022 04:05 AM)Roberto Volpi Wrote:  Well, one step forward and no calculator is needed at all ...

This reminds me of an older thread where a 40 line program was reduced to a single key:
(06-13-2022 01:05 PM)Albert Chan Wrote:  We can use multiply key, instead of a program.
Find all posts by this user
Quote this message in a reply
11-19-2022, 01:42 AM
Post: #22
RE: (35S) Quick integration
This inquiry concerns the calculus of integrating the sqrt(1+4x2) function.

I have elementry calculus skills.

I have run the function through the hp prime calculator in cas mode, xcas,
and two versions of maple (version 12 and old win 3.1 version).

I get results containing natural logs in on the prime. and I get results containing
arcsinh in Maple.

I have done the math calculations on the prime, dm 15L, free42, hp15c android app,
hp 35s, hp50g, and some others calcs. I get the same numerical answer,
eg 1.47894285....

Can someone walk me througj the symbolic calculation of the function?

Thanks
.
Find all posts by this user
Quote this message in a reply
11-19-2022, 04:58 AM
Post: #23
RE: (35S) Quick integration
(11-19-2022 01:42 AM)Liamtoh Resu Wrote:  Can someone walk me through the symbolic calculation of the function?

∫(sqrt(1+4*x^2) dx)            // let y=2x, dy = 2 dx
= ∫(sqrt(1+y^2) (dy/2))       // let y=sinh(z), dy = cosh(z) dz
= ∫(cosh(z) (cosh(z)/2 dz))
= ∫((1+cosh(2z))/4 dz)         // cosh(z)^2 = (1+cosh(2z))/2
= (z + sinh(2z)/2)/4             // sinh(2z) = 2*sinh(z)*cosh(z)
= (z + sinh(z)*cosh(z))/4

∫(x = 0 .. 1)
= ∫(y = 0 .. 2)
= ∫(z = 0 .. asinh(2))
= (asinh(2) + 2*sqrt(5))/4
≈ 1.47894285754
Find all posts by this user
Quote this message in a reply
11-19-2022, 05:19 AM
Post: #24
RE: (35S) Quick integration
(11-19-2022 01:42 AM)Liamtoh Resu Wrote:  Can someone walk me through the symbolic calculation of the function?

I used the substitution:

\(
\begin{align}
2x &= \sinh(u) \\
4x^2 &= \sinh^2(u) \\
1 + 4x^2 &= 1 + \sinh^2(u) \\
&= \cosh^2(u) \\
\sqrt{1 + 4x^2} &= \cosh(u) \\
\end{align}
\)

After applying \(\frac{d}{du}\) on both sides of the substitution we get:

\(
\begin{align}
2\frac{dx}{du} &= \cosh(u) \\
\end{align}
\)

From this:

\(
\begin{align}
dx &= \tfrac{1}{2}\cosh(u) \, du \\
\end{align}
\)

Replace the substitution in the original integral:

\(
\begin{align}
\int \sqrt{1 + 4 x^2} \, dx
&= \tfrac{1}{2} \int \cosh^2(u) \, du \\
&= \tfrac{1}{4} \int 1 + \cosh(2u) \, du \\
&= \tfrac{1}{4} \left( u + \tfrac{1}{2} \sinh(2u) \right) +c \\
&= \tfrac{1}{8} \left( 2u + \sinh(2u) \right) +c \\
\end{align}
\)

Here we used the double angle formula:

\(
\begin{align}
\cosh(2u) = 2\cosh^2(u) - 1
\end{align}
\)

Now we can substitute the lower and upper limits:

\(
\begin{align}
x = 0 \Rightarrow 2x = 0 &= \sinh(u) \rightarrow u = 0 \\
x = 1 \Rightarrow 2x = 2 &= \sinh(u) \rightarrow u = \sinh^{-1}(2) \\
\end{align}
\)

Plugging them into the antiderivative leads to:

\(
\begin{align}
\int_0^1 \sqrt{1 + 4 x^2} \, dx
&= \frac{2 \sqrt{5} + \sinh^{-1}(2)}{4} \\
\end{align}
\)

Here again we used another double angle formula:

\(
\begin{align}
\sinh(2u)
&= 2\sinh(u)\cosh(u) \\
&= 2 \cdot 2x \cdot \sqrt{1 + 4x^2}
\end{align}
\)



However e.g. WolframAlpha comes up with a different substitution:

\(
\begin{align}
x &= \frac{\tan(u)}{2} \\
\end{align}
\)

But I'm too lazy to write that down here.
Maybe you want to give it a try?

References
Find all posts by this user
Quote this message in a reply
11-19-2022, 05:36 AM
Post: #25
RE: (35S) Quick integration
(11-19-2022 01:42 AM)Liamtoh Resu Wrote:  I get results containing natural logs in on the prime. and I get results containing arcsinh in Maple.

That's because:

\(
\begin{align}
\sinh^{-1}(x) = \log \left(\sqrt{x^2 + 1} + x \right)
\end{align}
\)
Find all posts by this user
Quote this message in a reply
11-19-2022, 04:45 PM
Post: #26
RE: (35S) Quick integration
Thanks to everybody who replied. It will take me awhile to parse
the answers.
Find all posts by this user
Quote this message in a reply
11-28-2022, 06:49 PM
Post: #27
RE: (35S) Quick integration
Another way to integrate, without knowing trig or hyperbolic identities.
Euler substitution, to remove square root: √(x^2+1) = x + t





At the end of blackpenredpen video, we have:

∫(√(x^2+1) dx) = (x*√(x^2+1) + ln(x+√(x^2+1))) / 2 + C

OP integral is now easy to calculate.

∫(√(1+4*x^2), x = 0 .. 1)            // let y=2x, dy=2 dx
= 1/2 * ∫√(y^2+1), y = 0 .. 2)
= 1/2 * preval((x*√(x^2+1) + ln(x+√(x^2+1))) / 2, 0, 2)
= (2*√5 + ln(2+√5)) / 4
Find all posts by this user
Quote this message in a reply
12-22-2022, 01:54 PM (This post was last modified: 08-19-2023 10:47 AM by Albert Chan.)
Post: #28
RE: (35S) Quick integration
(11-28-2022 06:49 PM)Albert Chan Wrote:  At the end of blackpenredpen video, we have:

∫(√(x^2+1) dx) = (x*√(x^2+1) + ln(x+√(x^2+1))) / 2 + C

Another way, by guessing shape of RHS

Let x = sinh(y)      → dx = cosh(y) dy

Matching integral, we wanted cosh(y) dx
Guess from integration by part term, cosh(y)*x

d(cosh(y)*x) = d(sinh(2y)/2) = cosh(2y) dy = (2*cosh(y)^2-1) dy = 2*cosh(y) dx - dy

cosh(y) dx = (d(x*√(x^2+1)) + dy) / 2

--> ∫(√(x^2+1) dx) = (x*√(x^2+1) + asinh(x)) / 2 + C



Mathematica way, let x = tan(y), dx = sec(y)^2 dy

∫(√(x^2+1) dx) = ∫(sec(y)^3 dy)

∫(sec(y)^3 dy)
= ∫(sec(y) d(tan(y))
= tan(y)*sec(y) - ∫(tan(y) * (tan(y) sec(y) dy))      // integrate by parts
= tan(y)*sec(y) + ∫(sec(y) dy) - ∫(sec(y)^3 dy)

From definition of Gudermannian function inverse
[Image: 76c0302e0820820cf3804ab0b839f12d330716d2]

∫(sec(y)^3 dy) = (tan(y)*sec(y) + asinh(tan(y))) / 2 + C

--> ∫(√(x^2+1) dx) = (x*√(x^2+1) + asinh(x)) / 2 + C

This is also the approach used by https://www.integral-calculator.com/
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)