Maclaurin series with products and logarithms
A logarithm of an exponential
Question. Expand \(y=\ln(1+e^x)\) about \(x=0\) through the term in \(x^4\).
Solution
Step 1. Replace the repeated exponential. Put \(t=e^x\). Then \(y=\ln(1+t)\), and \(x=0\) gives \(t=e^0=1\).
Step 2. Differentiate with respect to x. First differentiate the expression with respect to t. Then multiply by the derivative of t. Repeat both operations for every new row.
\[y_1=\frac{dy}{dt}\frac{dt}{dx}=\frac{1}{1+t}\cdot t\]
\[y_2=t\frac{d}{dt}\left(\frac{t}{1+t}\right)\]
\[=t\frac{(1+t)-t}{(1+t)^2}=\frac{t}{(1+t)^2}\]
Step 3. Fill the two columns. Keep t in the left column. Put \(t=1\) only in the right column.
| Differentiate | Put x = 0 |
|---|---|
\[y=\ln(1+t)\] | \[(y)_0=\ln2\] |
\[y_1=\frac{t}{1+t}\] | \[(y_1)_0=\frac12\] |
\[y_2=\frac{t}{(1+t)^2}\] | \[(y_2)_0=\frac14\] |
\[y_3=\frac{t(1-t)}{(1+t)^3}\] | \[(y_3)_0=0\] |
\[y_4=\frac{t(1-4t+t^2)}{(1+t)^4}\] | \[(y_4)_0=-\frac18\] |
Now substitute the values.
\[\ln(1+e^x)=\ln2+\frac x2+\frac{x^2}{8}-\frac{x^4}{192}+\cdots\]
Watch the lesson
When the paper says “hence”
Question. Expand \(\frac{e^x}{1+e^x}\) through the cubic term. Hence obtain the expansion of \(\ln(1+e^x)\) through the quartic term.
Solution
Let \(g(x)=\frac{e^x}{1+e^x}\). Since \(g=y_1\) in the preceding table, its first four entries are \(g(0)=\frac12,\ g'(0)=\frac14,\ g''(0)=0,\ g'''(0)=-\frac18\). Substitute these into Maclaurin’s formula.
\[\frac{e^x}{1+e^x}=\frac12+\frac{x}{4}-\frac{x^3}{48}+\cdots\]
Integrate term by term. The antiderivative is \(C+\frac{x}{2}+\frac{x^2}{8}-\frac{x^4}{192}+\cdots\). At \(x=0\), the original logarithm equals \(\ln 2\), so \(C=\ln 2\).
\[\ln(1+e^x)=\ln 2+\frac{x}{2}+\frac{x^2}{8}-\frac{x^4}{192}+\cdots\]
A product with a logarithm
Question. Use Maclaurin’s series to expand \(y=e^x\ln(1+x)\) through the term in \(x^4\).
Solution
Multiply both sides by \(e^{-x}\) to isolate the logarithm. On the left, the product rule gives \(e^{-x}y_1-e^{-x}y\). On the right, the derivative is \(\frac{1}{1+x}\). Differentiate each resulting equation before putting \(x=0\) in its right-hand column.
| Differentiate | Put x = 0 |
|---|---|
\[e^{-x}y=\ln(1+x)\] | \[y(0)=0\] |
\[e^{-x}(y_1-y)=\frac1{1+x}\] | \[(y_1)_0=1\] |
\[e^{-x}(y_2-2y_1+y)=-\frac1{(1+x)^2}\] | \[(y_2)_0-2=-1\;\Rightarrow\;(y_2)_0=1\] |
\[e^{-x}(y_3-3y_2+3y_1-y)=\frac2{(1+x)^3}\] | \[(y_3)_0-3+3=2\;\Rightarrow\;(y_3)_0=2\] |
\[e^{-x}(y_4-4y_3+6y_2-4y_1+y)=-\frac6{(1+x)^4}\] | \[(y_4)_0-8+6-4=-6\;\Rightarrow\;(y_4)_0=0\] |
Now substitute the values.
\[e^x\ln(1+x)=x+\frac{x^2}{2}+\frac{x^3}{3}+0x^4+O(x^5)\]