I have two functions, $f(x) = a_0 e^{-a_6 \bigl( x + (a_1 x + a_2) \bigr)}$ and $g(x) = \big| a_3 x^2 + a_4 x + a_5 \bigr|$
I'm trying to find the integral $\int{f(x)/g(x) dx}$.
Wolfram gives this:
$$(a_0 \exp\left(-\frac12 (2 a_2 + \frac{a_1 + 1}{ a_3 } \bigl( \sqrt{a_4^2 - 4 a_3 a_5} - a_4 \bigr) a_6 \right) (\mathrm{Ei}(-((a_1 + 1) (2 x a_3 + a_4 - \sqrt(a_4^2 - 4 a_3 a_5)) a_6)/(2 a_3)) - e^{(((a_1 + 1) \sqrt(a_4^2 - 4 a_3 a_5) a_6)/a_3)} \mathrm{Ei}(-((a_1 + 1) (2 x a_3 + a_4 + \sqrt(a_4^2 - 4 a_3 a_5)) a_6)/(2 a_3))) \mathrm{sgn}(a_3 x^2 + a_4 x + a_5))/\sqrt(a_4^2 - 4 a_3 a_5) + \mathrm{constant}$$
which is a problem because of Ei, the exponential integral. On my platform, computing Ei does not really seem feasible. AFAIK there is no "simple" approximation of $\mathrm{Ei}(x)$.
What I might be able to do is transform some of the functions around, since they represent other concepts. For example $f(x)$ is really just Beer's Law, and $g(x)$ is really just an abstract representation of the area of a triangle whose points are a function of $x$, changing $g(x)$ to $$\frac14 \sqrt{a_3 x^4 + a_4 x^3 + a_5 x^2 + a_6 x + a_7}$$ (note I compressed constants together into these $a_n$ terms) if we use herons formula. Unfortunately plugging this into Wolfram gives me nothing.
What is strange is that individually these functions seem to give perfectly normal integrals (using $1/g(x))$, and visually in what I'm trying to compute there's no transcendental-ness going on, so I'm not exactly sure what is causing the need to use Ei. Is there any way I can avoid having these non elementary functions in my integral, or at least only have functions that are relatively easy to compute?
Also note that $x$ is always non-negative, and all constants as well as $x$ are real numbers.
I do not see how you could avoid the exponential integral.
Concerning its approximation, for real values of $x$, you could use the expansion $$\text{Ei}(x)=\gamma+\log (x)+\sum_{n=1}^\infty \frac {x^n}{n\, n!}$$ which converges quite fast.
If you look here, you will see that Ramanujan proposed a faster convergence expansion $${\rm Ei} (x) = \gamma + \ln x + e^{\frac x 2} \sum_{n=1}^\infty \frac{ (-1)^{n-1} x^n} {n! \, 2^{n-1}} \sum_{k=0}^{\left\lfloor \frac{n-1}{2}\right\rfloor} \frac{1}{2k+1}$$ where
$$\sum_{k=0}^{\left\lfloor \frac{n-1}{2}\right\rfloor} \frac{1}{2k+1}=\frac{1}{2} H_{\left\lfloor \frac{n-1}{2}\right\rfloor +\frac{1}{2}}+{\log (2)}$$