A long integral...

We are to evaluate the following integral, \begin{equation} \boxed{ I = \int_0^1 x \log(\sqrt{1+x}+\sqrt{1-x})\log(\sqrt{1+x}-\sqrt{1-x})dx } \label{integral} \tag{I} \end{equation}

Define the following two functions: \begin{subequations} \begin{align} p(x)&=\sqrt{1+x}+\sqrt{1-x} \label{plus}\\ m(x)&=\sqrt{1+x}-\sqrt{1-x} \label{minus} \end{align} \end{subequations} The product of these two functions is, \begin{equation} p(x)m(x)=2x \Rightarrow x =\frac{1}{2}p(x)m(x) \label{product} \end{equation} (\ref{integral}), (\ref{plus}), (\ref{minus}) and (\ref{product}) can be combined to give, \begin{equation} I = \frac{1}{2}\int_0^1 p(x)m(x) \log p(x)\log m(x)dx \label{allispm} \end{equation} Since, \begin{equation} \frac{dm(x)}{dx}=\frac{1}{2}\left(\frac{1}{\sqrt{1+x}}+\frac{1}{\sqrt{1-x}}\right) =\frac{1}{2} \frac{p(x)}{\sqrt{1-x^2}} \label{mderiv} \end{equation} we can combine (\ref{allispm}) and (\ref{mderiv}) to get, \begin{equation} I = \int_0^1 \sqrt{1-x^2}m(x) \log p(x)\log m(x)dm(x) \label{xishere} \end{equation} We want to try to express $I$ in terms of $m(x)$. To do this note some other useful properties of $p(x)$ and $m(x)$: \begin{subequations} \begin{align} p^2(x)+m^2(x)&=4 \label{plusSQ}\\ p^2(x)-m^2(x)&=4\sqrt{1-x^2} \label{minusSQ} \end{align} \end{subequations} Using (\ref{minusSQ}) we can get rid of $\sqrt{1-x^2}$: \begin{equation} I = \frac{1}{4}\int_0^1 \left( p^2(x)-m^2(x) \right)m(x)\log p(x)\log m(x) dm(x) \label{xisgone} \end{equation} Next we can use (\ref{plusSQ}) in (\ref{xisgone}) to get an integrand that only contains $m(x)$: \begin{equation} I = \frac{1}{4}\int_0^1 \left( 4-2m^2(x) \right)m(x)\log\sqrt{4-m^2(x)}\log m(x) dm(x) \label{pisgone} \end{equation} Since $\log\sqrt{4-m^2(x)}=\frac{1}{2}\log(4-m^2(x))$, \begin{equation} I = \frac{1}{4}\int_0^1 \left( 2-m^2(x) \right)m(x)\log(4-m^2(x))\log m(x) dm(x) \label{powerisgone} \end{equation} If we define $q(x)=m^2(x)$ then, \begin{align} dq(x) &= 2 m(x) dm(x) \label{dqx}\\ \log q(x)&=2 \log m(x) \label{logqx} \end{align} Using (\ref{dqx}) and (\ref{logqx}) in (\ref{powerisgone}) we get, \begin{equation} I = \frac{1}{16}\int_0^1 \left( 2-q(x) \right)\log(4-q(x))\log q(x)dq(x) \label{misgone} \end{equation} The new limits for this integral are, \begin{align} q(0)&= m^2(0)=(\sqrt{1}-\sqrt{1})^2=0 \\ q(1)&= m^2(1)=(\sqrt{2})^2=2 \end{align} and (\ref{misgone}) can be written as, \begin{equation} I = \frac{1}{16}\int_0^2 (2-q)\log(4-q)\log q dq \label{IQ} \end{equation} To make (\ref{IQ}) more amenable define $x=2-q$: \begin{equation} I = -\frac{1}{16}\int_2^0 x\log(2+x)\log(2-x) dx = \frac{1}{16}\int_0^2 x\log(2+x)\log(2-x) dx \label{amenable} \end{equation}



The next step is to evaluate the indefinite integral, \begin{equation} F(x)=\int x \log(2+x)\log(2-x)dx \label{indi} \end{equation} As with most integrals involving the logarithmic function, we use the following trick for integration by parts: \begin{subequations} \begin{align} v(x)=x\log(2-x) & \Rightarrow dv(x)=\left(\log(2-x)-\frac{x}{2-x}\right) dx \label{vx}\\ du(x)=\log(2+x)dx & \Rightarrow u(x)=(2+x)\log(2+x)-(2+x) \label{dux} \end{align} \end{subequations} to rewrite $F(x)$ as, \begin{align} F(x)&=x\log(2-x)\left((2+x)\log(2+x)-(2+x)\right) \nonumber \\ & -\int \left((2+x)\log(2+x)-(2+x)\right)\left(\log(2-x)-\frac{x}{2-x}\right)dx \label{FX} \end{align} The integrand in (\ref{FX}) consists of four terms: \begin{multline} \left((2+x) \log(2+x)-(2+x)\right)\left(\log(2-x)-\frac{x}{2-x}\right)= \\ (2+x) \log(2+x)\log(2-x)-\frac{(2+x)x}{2-x}\log(2+x)\\ -(2+x)\log(2-x)+\frac{(2+x)x}{2-x} \label{fourterms} \end{multline} The first term in (\ref{fourterms}) can be written as, \begin{equation} (2+x)\log(2+x)\log(2-x)=2\log(2+x)\log(2-x)+x\log(2+x)\log(2-x) \label{splitfirstterm} \end{equation} with the second term in (\ref{splitfirstterm}) being identical to the integrand in (\ref{indi}). If we combine (\ref{fourterms}) and (\ref{splitfirstterm}), (\ref{FX}) can be written as, \begin{align} 2F(x)&= x\log(2-x)\left((2+x)\log(2+x)-(2+x)\right) \nonumber \\ & - 2\int \log(2+x)\log(2-x)dx + \int \frac{(2+x)x}{(2-x)}\log(2+x)dx \nonumber \\ & + \int (2+x)\log(2-x)dx - \int \frac{(2+x)x}{2-x} dx \label{FXformA} \end{align} (\ref{FXformA}) still has an integral which contains the product $\log(2+x)\log(2-x)$. We are going to try to reduce it to an integral containing a single logarithm: \begin{align} \int \log(2+x)\log(2-x)dx & =\log(2-x)\left((x+2)\log(2+x)-(2+x)\right) \nonumber \\ & +\int \left(\frac{2+x}{2-x}\log(2+x)-\frac{2+x}{2-x} \right) dx \label{twotoone} \end{align} Notice that terms, \[ \int \frac{2+x}{2-x}\log(2+x) dx \] and, \[ \int \frac{2+x}{2-x} dx \] in (\ref{twotoone}) have corresponding terms in (\ref{FXformA}) and can be combined in the following equation: \begin{multline} \int \frac{(2+x)x}{(2-x)}\log(2+x)dx - 2\int \frac{2+x}{2-x}\log(2+x) dx \\ - \int \frac{(2+x)x}{2-x} dx + 2 \int \frac{2+x}{2-x} dx \\ = - \int (2+x) \log(2+x) dx + \int (2+x) dx \label{combineterms} \end{multline} Furthermore there is a term, \begin{equation*} x\log(2-x)\left((2+x)\log(2+x)-(2+x)\right) \end{equation*} in (\ref{FXformA}) that can be combined with, \begin{equation*} -2\log(2-x)\left((x+2)\log(2+x)-(2+x)\right) \end{equation*} from (\ref{twotoone}) (remember that (\ref{twotoone}) appears in (\ref{FXformA}) with a $-2$ factor in front) to produce, \[ (x-2)\log(2-x)\left((2+x)\log(2+x)-(2+x)\right) \] Therefore (\ref{twotoone}) and (\ref{combineterms}) can be used to rewrite (\ref{FXformA}) as, \begin{align} 2F(x)&=(x-2)\log(2-x)\left((2+x)\log(2+x)-(2+x)\right) \nonumber \\ &-\int (2+x)\log(2+x)dx +\int (2+x)\log(2-x)dx + \int (2+x) dx \label{unresolved} \end{align} For, \[ \int (2+x)\log(2+x)dx \] using integration by parts where $v(x)=2+x$ and $du(x)=\log(2+x) dx$, \begin{multline} \int (2+x)\log(2+x)dx = (2+x) \left((2+x)\log(2+x)-(2+x)\right) \\ -\int \left((2+x)\log(2+x)-(2+x)\right) dx \label{standardlogintegral} \end{multline} Since the original integral repeats in the r.h.s. of (\ref{standardlogintegral}) we can rewrite it as, \begin{multline} \int (2+x)\log(2+x)dx =\frac{1}{2}(2+x) \left((2+x)\log(2+x)-(2+x)\right) \\ + \frac{1}{2}\int (2+x) dx \label{firstlongintegral} \end{multline} (\ref{firstlongintegral}) appears in (\ref{unresolved}) with a minus sign in front; (\ref{unresolved}) also contains a $\int (2+x) dx$ term. If we combine these two parts we can consolidate them into the following expression: \begin{multline} -\int (2+x)\log(2+x)dx+\int (2+x) dx= \\ -\frac{1}{2}(2+x) \left((2+x)\log(2+x)-(2+x)\right)+ \frac{1}{2}\int (2+x) dx \label{consolidated} \end{multline} The integral, \[ \int (2+x)\log(2-x)dx \] is slightly longer. As before use $v(x)=2+x$ and $du(x)=\log(2-x)dx$. However now, \[ u(x)=-\left((2-x)\log(2-x)-(2-x)\right) \] so that, \begin{align} \int (2+x)\log(2-x)dx & =-(2+x)\left((2-x)\log(2-x)-(2-x)\right) \nonumber \\ & +\int (2-x) \log(2-x) dx - \int (2-x) dx \label{integral2plusxlog2minusx} \end{align} For the integral, \[ \int (2-x) \log(2-x) dx \] we can repeat the same procedure we used for (\ref{standardlogintegral}) to get, \begin{multline} \int (2-x) \log(2-x) dx=-\frac{1}{2}(2-x)\left((2-x)\log(2-x) - (2-x)\right) \\ +\frac{1}{2}\int (2-x) dx \label{anothestandardlogintegral} \end{multline} Combining (\ref{integral2plusxlog2minusx}) and (\ref{anothestandardlogintegral}) we get, \begin{align} \int (2+x)\log(2-x)dx = & -(2+x)\left((2-x)\log(2-x)-(2-x)\right) \nonumber \\ & -\frac{1}{2}(2-x)\left((2-x)\log(2-x)-(2-x)\right) \nonumber \\ & -\frac{1}{2} \int (2-x) dx \label{secondlongintegral} \end{align} With (\ref{firstlongintegral}) and (\ref{secondlongintegral}), (\ref{unresolved}) can be rewritten as, \begin{align} 2F(x)&=(x-2)\log(2-x)\left((2+x)\log(2+x)-(2+x)\right) \nonumber \\ & -\frac{1}{2}(2+x)\left((2+x)\log(2+x)-(2+x)\right) \nonumber \\ & -(2+x)\left((2-x)\log(2-x)-(2-x) \right) \nonumber \\ & -\frac{1}{2}(2-x)\left((2-x)\log(2-x)-(2-x) \right) \nonumber \\ & -\frac{1}{2}\int (2-x) dx + \frac{1}{2}\int (2+x) dx \label{penultimate} \end{align} We are left with the simple integral, \begin{equation} \frac{1}{2}\int (2+x) dx -\frac{1}{2}\int (2-x) dx = \frac{1}{2} \int (2+x-2+x) dx = \frac{x^2}{2} \label{lastintegral} \end{equation} So using (\ref{lastintegral}), (\ref{penultimate}) becomes, \begin{align} 2F(x)&=(x-2)\log(2-x)\left((2+x)\log(2+x)-(2+x)\right) \nonumber \\ &-\frac{1}{2}(2+x)\left((2+x)\log(2+x)-(2+x)\right) \nonumber \\ &-(2+x)\left((2-x)\log(2-x)-(2-x) \right) \nonumber \\ &-\frac{1}{2}(2-x)\left((2-x)\log(2-x)-(2-x) \right)+\frac{x^2}{2} \label{solution} \end{align} We can now evaluate $F(x)$ for $x=0$ and $x=2$. The longest expression is for $x=0$, \begin{align} 2F(0)&=-2\log(2)(2\log(2)-2)-(2\log(2)-2)-2(2\log(2)-2)-(2\log(2)-2) \nonumber \\ 2F(0)& =4\log(2)-4\log^2(2)-4(2\log(2)-2) \nonumber \\ 2F(0)& =-4\log(2)-4\log^2(2)+8 \nonumber \\ F(0) &= -2\log(2)-2\log^2(2)+4 \label{xiszero} \end{align} For $x=2$ things are easier: \begin{equation*} 2F(2)=-\frac{1}{2}4(4\log(4)-4)+\frac{4}{2}=-16\log(2)+10 \end{equation*} or, \begin{equation} F(2)=-8\log(2)+5 \label{xistwo} \end{equation} Since (\ref{amenable}) can be written as, \begin{equation} I = \frac{1}{16}(F(2)-F(0)) \label{IF2F0} \end{equation} (\ref{xiszero}) and (\ref{xistwo}) in (\ref{IF2F0}) give, \begin{equation} I = \frac{1}{16} (-8\log(2)+5+2\log(2)+2\log^2(2)-4) =\frac{\log^2(2)}{8}-\frac{3\log(2)}{8}+\frac{1}{16} \label{result} \end{equation} Using the numpy function trapz which implements the composite trapezoidal rule for integration, $\Delta x=.0001$ in (\ref{integral}) gives $I\thickapprox -0.13737356$ while the value using (\ref{result}) is $I\thickapprox -0.13737357$ (both to an accuracy of eight decimal places).

Comments

Popular posts from this blog

CSAT 1

Poor man's Daletskii-Krein

PAT 2022