# How can I solve $\int \frac{P_1(t)}{P_2(t)e^{P_3(t)}} dt$

The other day I found an integral on the form:

$$\int \frac{P_1(t)}{P_2(t)e^{P_3(t)}} dt$$

where $$P_1,P_2,P_3$$ all are polynomials.

Does there exist any particular technique to approach solving such integrals?

My own work is mostly limited to quite fruitless experimentation with logarithmic derivative.

One idea I had was to rewrite it as

$$I(t_1) = \int_{-\infty}^{t_1} \frac{P_1(t)}{P_2(t)e^{P_3(t)}} dt$$

Then, by fundamental theorem of calculus:

$$\frac{\partial}{\partial t_1} I(t_1) = \frac{P_1(t_1)}{P_2(t_1)e^{P_3(t_1)}}$$

and:

$$P_2(t_1)e^{P_3(t_1)} \frac{\partial}{\partial t_1} I(t_1) = {P_1(t_1)}$$

This would then be solved in power series with some machinery which could solve for example an expanded version of: this, allowing $$P_k$$ to be arbitrary power series instead of polynomials.

• @ mathreadler It would help if you could write in what form your polynomials are given and in what form your result should be.
– IV_
Commented Feb 18, 2020 at 18:49

## 1.) Elementary antiderivatives

If degree$$_{P3}=0$$ or (degree$$_{P2}=0$$ and degree$$_{P3}\le 1$$), all antiderivatives of the integral are elementary.

There are at least two subclasses of nonelementary integrals in the integral tables:

$$f(x),g(x)\in \mathbb{C}[x]$$
$$\int f(x)e^{g(x)}\ dx,\ \ \ \int \frac{e^{f(x)}}{g(x)}\ dx$$

Yadav, D. K.: A Study on Nonelementary Functions. Ph.D. thesis, Vinoba Bhave University, 2012:
"2.2 Conjecture-2
An indefinite integral of the form $$\int\frac{e^{f(x)}}{g(x)}\ dx$$, where $$f(x)$$ and $$g(x)$$ are polynomial functions in $$x$$ of degree greater than or equal to $$1$$, is always nonintegrable."

for the general case:

See GEdgar's answer below with Brian Conrad's paper from 2005.

Cruz-Sampedro, J.; Tetlalmatzi-Montiel, M.: Hardy's Reduction for a Class of Liouville Integrals of Elementary Functions. Amer. Math. Monthly 123 (2016) (5) 448-470:
"Abstract. This paper is concerned with a class of integrals whose integrands are the product of a rational function times the exponential of a nonconstant rational function. We call these Liouville integrals. For these integrals, we provide a student-friendly algorithm producing a two-term decomposition with minimum transcendental and maximum elementary components. This decomposition fulfills the conditions of Hardy’s reduction theory, determines whether these integrals are elementary functions, and when in the affirmative, finds them. To achieve our goal, we use partial fraction decomposition, simple notions of linear algebra, and a special case of an 1835 theorem of Liouville that we refer to as Liouville’s criterion on integration. There is in the literature a complete algorithm to decide if the integral of an elementary function is also elementary. Ours is a gentle alternative for the class of Liouville integrals.

...

Theorem (Liouville’s criterion on integration, 1835). Let $$f$$ and $$g$$ be rational functions with $$g$$ nonconstant. Then $$\int f(x)e^{g(x)}\ dx$$ is an elementary function if and only if there exists a rational function $$R$$ such that $$\int f(x)e^{g(x)}\ dx=R(x)e^{g(x)}$$ or, equivalently, $$f(x)=R(x)g'(x)+R'(x)$$. (1)
This criterion is frequently used to show the calculus student that certain classical integrals such as ... cannot be expressed in terms of elementary functions"
$$\$$

## 2.) Nonelementary closed-form antiderivatives

a) If degree$$_{P3}\le 1$$, computer algebra software finds closed-form antiderivatives. If this closed-form antiderivatives aren't elementary, they contain the error function erf or the exponential integral Ei. They are very very long if degree$$_{P1}≥4$$ and degree$$_{P2}≥4$$.

b) Cherry, G. W.: An Analysis of the Rational Exponential Integral. SIAM J. Comp. 18 (1989) (5) 893-905:
"Abstract. In this paper an algorithm is presented for integrating expressions of the form $$\smallint ge^f dx$$, where $$f$$ and $$g$$ are rational functions of $$x$$, in terms of a class of special functions called the special incomplete $$\Gamma$$ functions. This class of special functions includes the exponential integral, the error function, the sine and cosine integrals, and the Fresnel integrals. The algorithm presented here is an improvement over those published previously for integrating with special functions in the following ways: (i) This algorithm combines all the above special functions into one algorithm, whereas previously they were treated separately. (ii) Previous algorithms require that the underlying field of constants be algebraically closed. This algorithm, however, works over any field of characteristic zero in which the basic field operations can be carried out. (iii) This algorithm does not rely on Risch’s solution of the differential equation $$y'+fy=g$$. Instead, a more direct method of undetermined coefficients is used."
$$\$$

## 3.) Taylor series representation

You could calculate the Taylor series of the integrand and integrate the series. You can make this by computer algebra software.
$$\$$

## 4.)

$$P_1(t)=a_0+\sum_{i=1}^{d_1}a_it^i,\ \ P_2(t)=b_0+\sum_{i=1}^{d_2}b_it^i,\ \ P_3(t)=c_0+\sum_{i=1}^{d_3}c_it^i$$

$$I(t)=F(t)=f_0+\sum_{i=1}^{\infty}f_it^i,\ \ I'(t)=F'(t)=\sum_{i=1}^{\infty}if_it^{i-1}$$

Let $$B_{i,d_3}(P_3(t))=B_{i,d_3}(0!c_0,1!c_1,...,d_3!c_{d_3})$$ be the corresponding Exponential Bell polynomial.

$$e^{P_3(t)}=\sum_{i=0}^{\infty}\frac{e^{c_0}}{i!}B_{i,d_3}(P_3(t))t^i$$
$$\$$

$$P_2(t)e^{P_3(t)}I'(t)=P_1(t):$$

$$\left(b_0+\sum_{i=1}^{d_2}b_it^i\right)\left(\sum_{i=0}^{\infty}\frac{e^{c_0}}{i!}B_{i,d_3}(P_3(t))t^i\right)\left(\sum_{i=1}^{\infty}if_it^{i-1}\right)=a_0+\sum_{i=1}^{d_1}a_it^i$$

Expand the products by applying Cauchy product rule. Try to find the general term for the $$f_i$$. You then have the terms for formal power series. Check the appropriate domains of all functions to get the correct power series.
$$\$$

## 5.) Taylor series representation with general term

- Maclaurin form -

$$P_1(t)=a_0+\sum_{i=1}^{d_1}a_it^i,\ \ P_2(t)=b_0+\sum_{i=1}^{d_2}b_it^i,\ \ P_3(t)=c_0+\sum_{i=1}^{d_3}c_it^i$$

$$I(t)=F(t)=f_0+\sum_{n=1}^{\infty}f_nt^n,\ \ I'(t)=F'(t)=\sum_{n=1}^{\infty}nf_nt^{n-1}$$

$$F'(t)=\frac{P_1(t)e^{-P_3(t)}}{P_2(t)}$$

Let $$B_{i,d_3}(-P_3(t))=B_{i,d_3}(-0!c_0,-1!c_1,...,-d_3!c_{d_3})$$ be the corresponding Exponential Bell polynomial.

$$e^{-P_3(t)}=\sum_{i=0}^\infty\frac{e^{-c_0}}{i!}B_{i,d_3}(-P_3(t))t^i$$

$$P_1(t)e^{-P_3(t)}=\sum_{i=0}^{\infty}\left(\sum_{j=0}^ia_{i-j}\frac{e^{-c_0}}{j!}B_{j,d3}(-P_3(t))\right)t^i$$

$$P(t)=p_0+\sum_{i=1}^dp_it^i$$

Let $$B_{n,k,d_2}(P_2(t))=B_{n,k,d_2}(1!b_1,2!b_2,...,d_2!b_{d_2})$$ be the corresponding Partial exponential Bell polynomial.

$$\frac{P(t)}{P_2(t)}=\sum_{n=0}^\infty\left(\frac{1}{n!}\sum_{i=0}^n{n\choose i}i!p_i\sum_{k=0}^{n-i}(-1)^{k}k!b_0^{-k-1}B_{n-i,k,d_2}(P_2(t))\right)t^n$$

$$F'(t)=\frac{P_1(t)e^{-P_3(t)}}{P_2(t)}:$$

$$\sum_{n=1}^{\infty}nf_nt^{n-1}=$$

$$\sum_{n=0}^{\infty}\left(\frac{1}{n!}\sum_{i=0}^n\left({n\choose i}i!\left(\sum_{j=0}^ia_{i-j}\frac{e^{-c[0]}}{j!}B_{j,d3}(-P_3(t))\right)\left(\sum_{k=0}^{n-i}(-1)^kk!b_0^{-k-1}B_{n-i,k,d2}(P_2(t))\right)\right)\right)t^n$$

$$f_n=\frac{1}{n!}\sum_{i=0}^{n-1}\left({n-1\choose i}i!\left(\sum_{j=0}^ia_{i-j}\frac{e^{-c[0]}}{j!}B_{j,d3}(-P_3(t))\right)\left(\sum_{k=0}^{n-i-1}(-1)^kk!b_0^{-k-1}B_{n-i-1,k,d2}(P_2(t))\right)\right)$$

The easy cases, and probably the only elementary cases, are: $$P_2(t)=1$$ and $$-P_3'(t) = P_1(t)$$.

$$\int -P_3'(t)e^{-P_3(t)} dt = e^{-P_3(t)}+C$$

That was wrong. In fact, we have to allow $$\int \big(Q'(t) + Q(t)P'(t)\big)e^{P(t)} dt = Q(t)e^{P(t)}+C$$

See LINK for Liouville's theory of integration in finite terms.

In particular, see Theorem 4.4 in Conrad's paper

For $$\int \frac{P_1(t)}{P_2(t)e^{P_3(t)}} dt$$ where $$P_1, P_2, P_3$$ are all polynomials, in order to have elementary integral we must have $$P_2$$ constant.

• Aha, this Liouville theorem was new to me. Thank you! Commented Feb 23, 2020 at 9:24