Post Reply 
(PC-12xx~14xx) qthsh Tanh-Sinh quadrature
04-17-2021, 12:03 AM
Post: #59
RE: (PC-12xx~14xx) qthsh Tanh-Sinh quadrature
(04-15-2021 07:02 PM)robve Wrote:  \( \int_0^{700} e^{-0.01y}\,dy \):
k=3 err=4.82092e-11 pts=58
quad = 99.9088118034444

\( \int_{700}^\infty e^{-0.01y}\,dy \):
k=5 err=8.41427e-09 pts=235
quad = 0.0911881965443389

We can build exp-sinh transformed integrand, and see the curve, in XCas.

XCas> f(x) := exp(-0.01*x)
XCas> y := d * exp(sinh(t))
XCas> g := unapply(f(y) * diff(y,t), (d,t))
XCas> g2(d) := [g(d,-t), g(d,t)]
XCas> int(g2(1), t=0..5)                 → [0.995016625083, 99.0049833749]
XCas> int(g2(700), t=0..5)             → [99.9088118034, 0.0911881965555]

XCas> plot(g2(700), t=0..3, color=[blue, red])

The plot showed a nice bell-shaped curve, easy to get area, simply by summing squares.
see https://www.hpmuseum.org/forum/thread-13...#pid127590

\(\displaystyle\begin{align}
\int_0^∞ f(x)\,dx &= \int_{-∞}^∞ g(t)\,dt
= \int_{-∞}^∞ {g(t) + g(-t) \over 2} \,dt \\
&= \int_0^∞ g(-t)\,dt + \int_0^∞ g(t)\,dt \\
&= \int_0^d f(x)\,dx\;\,+ \int_d^∞ f(x)\,dx
\end{align} \)

Note we take advantage of even functions, and fold the integrals.
see Integration trick: clever use of even and odd parts - John D. Cook
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (PC-12xx~14xx) qthsh Tanh-Sinh quadrature - Albert Chan - 04-17-2021 12:03 AM



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