Integration using numerical methods

99 Views Asked by At

I have been trying to solve the following integral

$$\frac{1}{60} \int_0^{300} e^{- \left(\frac{x}{60} \right)} \cdot e^{\left(\frac{x-300}{240} \right)^{1.03}}dx$$

I have tried solving by parts as well numerical methods such as the trapezoid rule and Simpson's rule. However, I'm finding that when it comes to the $e^{(\frac{x-300}{240})^{1.03}}$ portion of the equation, when $x=0$ I keep generating a result involving complex numbers because of the $(\cdot)^{1.03}$. I have been told the result is $\approx 0.4310$ though.

Any help much appreicated

3

There are 3 best solutions below

0
On BEST ANSWER

I think that you are totally correct, since for any non integer value of $a$, the integrand is a complex number (plot the real and imaginary parts of the function corresponding to the integrand over the range of integration).

Let us forget the constant term and focus on $$e^{-\frac{x}{60}}\,e^{(\frac{x-300}{240})^{1+\epsilon}}$$ and develop as a Taylor series around $\epsilon=0$; the result would be $$f=e^{-\frac{x+20}{80}}-\frac{1}{240} \left(e^{-\frac{x+20}{80}} (x-300) (\log (240)-\log (x-300))\right)\epsilon+O\left(\epsilon ^2\right)$$ You could check easily that this is a good approximation of both real an imaginary parts.

Now, if you integrate the above expansion, using special functions, you should get for $\int f\, dx$ $$-80e^{-\frac{x+20}{80}}+\frac{80 }{3 e^5}\text{Ei}\left(\frac{300-x}{80}\right)-\frac{1}{3} e^{-\frac{x+20}{80}} \left((x-220) \log \left(\frac{x-300}{240}\right)+80\right)\epsilon+O\left(\epsilon ^2\right)$$ where appears the exponential integral function.

Here no problem except with the logarithm which leads to complex numbers.

0
On

The generalized Weibull distribution is defined to be $0$ for negative values of the base, hence your integral should vanish.

0
On

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

With $\ds{\epsilon = 0.03}$ and $\ds{z^{1 + \epsilon} = \verts{z}^{1 + \epsilon}\expo{\ic\pars{1 + \epsilon}\arg\pars{z}}}$ where $\ds{z \not= 0}$ and $\ds{-\,{ \pi \over 2} < \arg\pars{z} < {3\pi \over 2}}$:

\begin{align} &\bbox[10px,#ffd]{\ds{{1 \over 60}\int_{0}^{300}\expo{-x/60} \expo{\bracks{\pars{x - 300}/240}^{1.03}}\dd x}} = {\expo{-5} \over 60}\int_{0}^{300}\expo{x/60} \exp\pars{\bracks{x \over 240}^{1 + \epsilon} \expo{\ic\pars{1 + \epsilon}\pi}}\dd x \\[5mm] & = 4\expo{-5}\int_{0}^{15/12}\expo{4x} \exp\pars{-x^{1 + \epsilon} \bracks{\cos\pars{\epsilon} + \ic\sin\pars{\epsilon}}}\dd x = \bbx{I_{0} + I_{1}\epsilon + \mrm{O}\pars{\epsilon^{2}}} \end{align}


$$ I_{0} = 4\expo{-5}\int_{0}^{15/12}\expo{4x} \exp\pars{-x}\dd x = \bbx{{4 \over 3}\,{\expo{15/4} - 1 \over \expo{5}}} \approx 0.3730 $$
\begin{align} I_{1} & = 4\expo{-5}\int_{0}^{15/12}\expo{4x}\braces{-\expo{-x}\bracks{-\ic + x\ln\pars{x}}}\dd x \\[5mm] & = \frac{2 \left(-2 \text{Ei}\left(\frac{15}{4}\right)+(-2-6 i)+2 \gamma +9 \log +e^{15/4} \left(-11\mrm{arccoth}\pars{9}+(2+6 i)\right)\right)}{9 e^5} \\[5mm] & \approx 0.0018 + 0.3730\ic \end{align}
\begin{align} &\bbx{\bbox[10px,#ffd]{\ds{{1 \over 60}\int_{0}^{300}\expo{-x/60} \expo{\bracks{\pars{x - 300}/240}^{1.03}}\dd x}} \approx 0.3731 + 0.0112\ic +\mrm{O}\pars{\epsilon^{2}}\,,\qquad\epsilon = 0.03} \end{align}