Evaluating the integral $\int e^{tx - 2|x|} dx$

790 Views Asked by At

I need to evaluate the following integral: $$\int_{-\infty}^{\infty} e^{tx - 2|x|} dx \tag*{for $t \in (-2, 2)$}$$

To attempt to evaluate this, I being by splitting the integral in two: $$ \int_{-\infty}^{\infty} e^{tx - 2|x|} dx \\ = \int_{-\infty}^{0} e^{tx + 2x} dx + \int_{0}^{\infty} e^{tx - 2x} dx \\ \text{Let }u = tx + 2x\text{, }du = t + 2 dx\\ \text{Let }v = tx - 2x\text{, }dv = t - 2 dx\\ = \int_{-\infty}^{0} \frac{e^{u}}{t + 2} du + \int_{0}^{\infty} \frac{e^{v}}{t - 2} dv \\ = \frac{1}{t + 2}\int_{-\infty}^{0} e^{u} du + \frac{1}{t - 2}\int_{0}^{\infty} e^{v}dv \\ = \frac{1}{t + 2}(1) + \frac{1}{t - 2}\int_{0}^{\infty} e^{tx - 2x} dx \\ $$ At this point I was unsure how to proceed, so I went to Wolfram Alpha to see how it evaluted the integral. Wolfram Alpha gives the following for the indefinite integral: $$ \int e^{tx - 2|x|} dx = \begin{cases} \frac{e^{tx + 2x}}{t + 2} & x < 0 \\ \frac{(t+2)e^{tx - 2x}-4}{t^2 - 4} & x > 0 \\ 0 & x = 0 \end{cases} $$

How do I proceed with evaluating this integral so no integral terms remain, and how does what I've found for the improper integral (if correct) reconcile with Wolfram Alpha's indefinite integral results?

2

There are 2 best solutions below

0
On

Hint:

$\int\limits_{-\infty}^0e^{tx+2x}dx=\int\limits_{-\infty}^0e^{(t+2)x}=(\dfrac{e^{(t+2)x}}{t+2})\big|_{-\infty}^0=\dfrac{e^{(t+2)\cdot 0}}{t+2}-\lim\limits_{y\to -\infty}\dfrac{e^{(t+2)y}}{t+2}=\dfrac{e^0}{t+2}-0=\dfrac{1}{t+2}$

No need to use substitution because we integrate with respect to $x$. Other integral is evaluated similarly.

0
On

$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} \left.\int_{-\infty}^{\infty}\expo{tx - 2\verts{x}}\,\dd x \,\right\vert_{\ t\ \in\ \pars{-2,2}} & = \int_{0}^{\infty} \bracks{\expo{tx - 2\verts{x}} + \expo{t\pars{-x} - 2\verts{-x}}}\,\dd x \\[5mm] &= \int_{0}^{\infty} \bracks{\expo{-\pars{2 - t}x} + \expo{-\pars{2 + t}x}}\,\dd x = \left.{\expo{-\pars{2 - t}x} \over t - 2} + {\expo{-\pars{2 + t}x} \over -t - 2}\right\vert_{\ 0}^{\ \infty} \\[5mm] & = -\,{1 \over t - 2} - {1 \over -t - 2} = \bbx{\ds{4 \over 4 - t^{2}}} \end{align}

Note that $\ds{\int_{-\infty}^{\infty}\mrm{f}\pars{x}\,\dd x = \int_{0}^{\infty}\bracks{\mrm{f}\pars{x}+ \mrm{f}\pars{-x}}\,\dd x}$.