how to code the EI[-any number] (exponential integral) in our closed form expression?

I got my closed form expression in EI[negative number]. When I integrate the integration by numerical method then it matched with the simulation, but I do not known how to code in exponential integral in closed form. I used the expint(negative number) it give real and imaginary number and also my simulation curve does not match with analytical curve. Please help me.

8 Comments

What is the original problem for which you get a closed form expression in EI(negative number) ?
Best wishes
Torsten.
i want to integrate this integration
$I = 1 - \exp \left\{ { - {\textstyle{{\left( {{A_4} - 1} \right)} \over T}}} \right\}\int\limits_0^\infty {\left[ \begin{array}{l}
{A_2}{A_3}{\textstyle{{\exp \left\{ { - \left( {{A_2} + {A_5}} \right)y} \right\}} \over {\left( {y + {A_3}} \right)}}}\\
+ {A_3}{\textstyle{{\exp \left\{ { - \left( {{A_2} + {A_5}} \right)y} \right\}} \over {{{\left( {y + {A_3}} \right)}^2}}}}
\end{array} \right]dy}$
only Y is the variable and all are constant. you can copy this code and paste in latex you can obtain the exact formula. solution of this integration come in the form of exponential integration form with help of table of integration book.
What about the constants ? They are positive ?
Best wishes
Torsten.
I got the solution in this form as
$\begin{array}{l}
\exp \left\{ { - {\textstyle{{\left( {{A_4} - 1} \right)} \over T}}} \right\}\left[ \begin{array}{l}
- {A_2}{A_3}\exp \left\{ {{A_3}\left( {{A_2} + {A_5}} \right)} \right\}\\
\times Ei\left\{ { - {A_3}\left( {{A_2} + {A_5}} \right)} \right\}
\end{array} \right]\\
+ \exp \left\{ { - {\textstyle{{\left( {{A_4} - 1} \right)} \over T}}} \right\}\left[ \begin{array}{l}
{A_3}\left( {{A_2} + {A_5}} \right)\\
\times \exp \left\{ {{A_3}\left( {{A_2} + {A_5}} \right)} \right\}\\
\times Ei\left\{ { - {A_3}\left( {{A_2} + {A_5}} \right)} \right\} + 1
\end{array} \right]
\end{array}$
This contain the Ei form. How to code in the matlab, and solve our problem? I got my solution by numerical integration method. but, I did not get by using EI form. Sir, please help me.
With all constants positive, expint(x) is always evaluated for positive numbers in your case.
You can see this by transforming your integrals to the integrands of the form exp(-t)/t and exp(-t)/t^2 by substitution.
Best wishes
Torsten.
Can you help me in substitution method? I am.unable to solve this form of integration. Please help me.
After a number of attempt, I did not find my solution. If someone can understand my problem then he can help me. Thanks

Sign in to comment.

 Accepted Answer

I get
I = 1-exp(-(A4-1)/T)*(A2*A3*exp((A2+A5)*A3)*expint(A3*(A2+A5))+A3*(A2+A5)*exp(-A3*(A2+A5))-A3^2*(A2+A5)^2*expint(A3*(A2+A5)))
Best wishes
Torsten.

7 Comments

It does not match with my simulation results. However, please send me the procedure to find this integration.
This should be correct now:
I = 1-exp(-(A4-1)/T)*(1-A3*A5*exp(A3*(A2+A5))*expint(A3*(A2+A5)))
Best wishes
Torsten.
Yes Sir, your second answer is correct, Please explain me procedure of finding this type of integration. A very very thank you Sir. I am very happy. But If you explain me procedure of finding this type of expression then I would be more happy. My Email Id is "sbs1988pks@gmail.com". Please send on this email. Thanks again.
The only trick is to substitute
y = x/(A2+A5) - A3
in the integral involved.
You will arrive at an integral of the form
int_{x = A3*(A2+A5)}^{x=oo} (constant1*exp(-x)/x + constant2*exp(-x)/x^2) dx
The first integral can directly taken as is, the second must be integrated by parts with u'(x)=1/x^2, v(x)=exp(-x).
I leave the rest to you.
Best wishes
Torsten.
Thank you sir for your nice approach and clear explanation. int_{x1=A3*(A2+A5)}^{x=oo} (exp(-x)/x) dx = E1(x1). Actually, E1(x1)=-Ei(-x1) and E1(x1)=expint(x1) in matlab code, is it correct? Earlier I assumed that expint(x1)= Ei(-x1) which was wrong. If these thinking are correct then you say me yes I am correct and then my knowledge will boost up. Thank you again.
Yes, you are correct :-)
Best wishes
Torsten.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!