3

We can find (and Wolfram Alpha does it perfectly) that:

$$\pi e=\int_0^1\left(\frac{4 e^x \cos(\ln(x))}{x^2+1}-\frac{4 e^x \arctan(x) \sin(\ln(x))}x+4 e^x \arctan(x) \cos(\ln(x))\right)\mathrm d x.$$

We could prove that by noticing that

$$\frac {\mathrm d}{\mathrm d x}\left(4\arctan(x)e^x\cos(\ln(x))\right)=\frac{4 e^x \cos(\ln(x))}{x^2+1}-\frac{4 e^x \arctan(x) \sin(\ln(x))}x+4 e^x \arctan(x) \cos(\ln(x))$$

but it seems like cheating.

Would there be a more systematic way to deal with such an integral ?

E. Joseph
  • 14,843
  • Separate the integral into three parts, then try integration by parts on the last term $4e^x \arctan(x)\cos(\ln(x))$ – Larry B. Sep 12 '16 at 16:09
  • 7
    No, there is no systematic way for humans. If you change any of the terms slightly, say replace one of the $\cos$ by a $\sin$ or turn the $-4$ in a $+4$, the integral becomes unmanageable, and this is completely unpredictable. Computers perform it using the Risch algorithm. –  Sep 12 '16 at 16:15
  • Thanks, I didn't know about Risch algorithm. – E. Joseph Sep 12 '16 at 16:18
  • looking at the integrand i think the anitderivative is guessable with enough experience...but systematically..no way – tired Sep 12 '16 at 20:02
  • Please edit the post to add additional context: where did this integral arise? Why is it of interest? – Carl Mummert Sep 12 '16 at 21:02

2 Answers2

3

You could start by finding $\displaystyle\int\frac{4e^x\cos(\ln x)}{x^2+1}dx\;$ using integration by parts

with $\displaystyle u=4e^x\cos(\ln x),\;dv=\frac{1}{x^2+1}dx,\;du=\left(4e^x\cos(\ln x)-\frac{4e^x\sin(\ln x)}{x}\right)dx,\;v=\tan^{-1}x$ to get

$\displaystyle\int\left(\frac{4 e^x \cos(\ln(x))}{x^2+1}-\frac{4 e^x \arctan(x) \sin(\ln(x))}x+4 e^x \arctan(x) \cos(\ln(x))\right)dx$

$\displaystyle=\left[4e^x\cos(\ln x)\tan^{-1}x-\int\left(4e^x\cos(\ln x)\tan^{-1}x-\frac{4e^x\sin(\ln x)\tan^{-1}x}{x}\right)dx\right]$

$\displaystyle\hspace{1.5 in}+\int\left((4e^x\cos(\ln x)\tan^{-1}x-\frac{4e^x\sin(\ln x)\tan^{-1}x}{x}\right)dx$

$\displaystyle\hspace{.1 in}=\color{blue}{4e^x\cos(\ln x)\tan^{-1}x+C}$

user84413
  • 27,211
1

How to find the solution naturally without cheating! (I mean without previously knowing the solution).

First, note that the given integral

$$\color{blue}{ \begin{equation*} I=\int \left( \frac{4e^{x}\cos \left( \ln x\right) }{1+x^{2}}-\frac{ 4e^{x}\arctan \left( x\right) \sin \left( \ln x\right) }{x}+4e^{x}\arctan (x)\ln (\cos (x))\right) dx \end{equation*} }$$ can be re-written as

$$\color{blue}{ \begin{equation*} \int \left( \frac{4\cos \left( \ln x\right) }{1+x^{2}}-\frac{4\arctan \left( x\right) \sin \left( \ln x\right) }{x}+4\arctan (x)\ln (\cos (x))\right) e^{x}dx \end{equation*}}$$ which is the form of

$$\color{blue}{ \begin{equation*} \int h(x)e^{x}dx. \end{equation*}}$$ So, we recognize the well-known formula

$$\color{blue}{ \begin{equation*} \int \left( f^{\prime }(x)+f(x)\right) e^{x}dx=f(x)e^{x}+C. \end{equation*}}$$

The easy proof (based on integration by parts) for a more general formula can be found at

Proof for formula $\int e^{g(x)}[f'(x) + g'(x)f(x)] dx = f(x) e^{g(x)}+C$

So the problem now is (without doing integral calculus) how to find $\color{blue}{f(x)}$ such that

$$\color{blue}{ \begin{equation*} 4\left( \frac{\cos \left( \ln x\right) }{1+x^{2}}-\frac{\arctan \left( x\right) \sin \left( \ln x\right) }{x}+\arctan (x)\ln (\cos (x))\right) =f^{\prime }(x)+f(x). \end{equation*}}$$ In the parentheses there are some well known derivatives expressions as

$$\color{blue}{ \begin{eqnarray*} \frac{1}{1+x^{2}} &=&\left( \arctan x\right) ^{\prime } \\ && \\ \frac{1}{x} &=&\left( \ln x\right) ^{\prime } \end{eqnarray*}}$$ so we can write

$$\color{blue}{ \begin{equation*} \cos \left( \ln x\right) \left( \arctan x\right) ^{\prime }-\sin \left( \ln x\right) \left( \ln x\right) ^{\prime }\arctan \left( x\right) +\arctan (x)\ln (\cos (x)) \end{equation*}}$$ with a little more experience (about chain rule) we can also note that

$$\color{blue}{ \begin{equation*} -\sin \left( \ln x\right) \left( \ln x\right) ^{\prime }=\left( \cos (\ln x)\right) ^{\prime } \end{equation*}}$$ so we have

$$\color{blue}{ \begin{equation*} \cos \left( \ln x\right) \left( \arctan x\right) ^{\prime }+\left( \cos (\ln x)\right) ^{\prime }\arctan \left( x\right) +\arctan (x)\ln (\cos (x)) \end{equation*}}$$ here we recognize the derivative of the product of two functions

$$\color{blue}{ \begin{equation*} u(x)v^{\prime }(x)+u^{\prime }(x)v(x)=\left( u(x)v(x)\right) ^{\prime } \end{equation*}}$$ where

$$\color{blue}{ \begin{equation*} u(x)=\ln (\cos x),\ \ \ \ \ \ \ \ \ \ \text{and} {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }v(x)=\arctan x. \end{equation*}}$$ So, we arrived to

$$\color{blue}{ \begin{equation*} \left( \arctan x\ln (\cos x)\right) ^{\prime }+\arctan (x)\ln (\cos (x)) \end{equation*}}$$ which gives (naturally)

$$\color{blue}{ \begin{equation*} f(x)=4\arctan (x)\ln (\cos (x)) \end{equation*}}$$ and therefore

$$\color{blue}{ \begin{equation*} I=\int (f^{\prime }(x)+f(x))e^{x}=4\arctan (x)\ln (\cos (x))e^{x}+C. \color{red} \blacksquare \end{equation*} }$$

Idris Addou
  • 4,193