Difficult Maclaurin Series

BurgerTown

New member
Joined
May 9, 2011
Messages
2
First time posting, so hopefully it works out and my code isn't too bad. I have been trying for a long time to find this Macluarin series, but to no avail. The function goes
Code:
f(x) = integral (1-ln(1+x))/x dx
. After I have the series, I need to use this to find a polynomial approx. to f(x) which is accurate to 3 decimal places on the interval [-1,1]. So if you could help me out and give me a walk through or something through the problem that would be great.

Thanks!
 
Hello, BurgerTown!

Welcome aboard!
I'll do the first part . . .


Find the Macluarin series for:   f(x)=1ln(1+x)xdx\displaystyle \text{Find the Macluarin series for: }\;f(x) \:=\:\int \frac{1-\ln(1+x)}{x}\,dx

Use this to find a polynomial approxomation to f(x)\displaystyle \text{Use this to find a polynomial approxomation to }f(x)
. .  which is accurate to 3 decimal places on the interval [-1,1].\displaystyle \text{ which is accurate to 3 decimal places on the interval }[\text{-}1,1].

First, find (or recall) the Maclaurin series for ln(1+x):\displaystyle \text{First, find (or recall) the Maclaurin series for }\ln(1+x):

. . \(\displaystyle \ln(1+x) \;=\;x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \hdots\)


\(\displaystyle \text{Then: }\;1 - \ln(1+x) \;=\;1 - x + \frac{x^2}{2} - \frac{x^3}{3} + \frac{x^4}{4} - \hdots\)

\(\displaystyle \text{Hence: }\;\frac{1 - \ln(1+x)}{x} \;=\;\frac{1}{x} - \frac{x}{2} - \frac{x^2}{3} + \frac{x^3}{4} - \hdots\)


\(\displaystyle \text{Therefore: }\;f(x) \;=\;\int\left(\frac{1}{x} - \frac{x}{2} - \frac{x^2}{3} + \frac{x^3}{4} - \hdots\right)\,dx\)

. . . . . . . . . . . . \(\displaystyle =\;\ln x - x + \frac{x^2}{2^2} - \frac{x^3}{3^2} + \frac{x^4}{4^2} - \hdots\)

 
111ln(1+x)xdx\displaystyle \int_{-1}^{1}\frac{1-ln(1+x)}{x}dx is undefined on the interval [-1,1].

Mainly because 111xdx\displaystyle \int_{-1}^{1}\frac{1}{x}dx is undefined on the interval [-1,1].

See the ln(x) in Soroban's series?. It is undefined on the given interval.

But, if we wanted 11ln(1+x)xdx\displaystyle \int_{-1}^{1}\frac{ln(1+x)}{x}dx, then we could hammer out a solution using series and integration.

It works out to be π24\displaystyle \frac{{\pi}^{2}}{4}

But, then 111xdx=πi\displaystyle \int_{-1}^{1}\frac{1}{x}dx=-{\pi}i. In other words, undefined.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



The usefulness of ln(1+x) is limited because of its slow convergence and the restriction 1<x1\displaystyle -1< x\leq 1

But, if we replace x with -x to get the series for ln(1-x), then subtract the two series we get:

ln(1+x1x)=2(x+x33+x55+x77+),   1x<1\displaystyle ln\left(\frac{1+x}{1-x}\right)=2\left(x+\frac{x^{3}}{3}+\frac{x^{5}}{5}+\frac{x^{7}}{7}+\cdot\cdot\cdot\right), \;\ -1\leq x<1......[1]

The last series can be used to compute the natural log of any positive number y by letting:

y=1+x1x\displaystyle y=\frac{1+x}{1-x}

x=y1y+1\displaystyle x=\frac{y-1}{y+1}.............[2]

and noting that 1<x<1\displaystyle -1<x<1.

Let compute ln(2) by letting y=2 in [2]. This gives x=1/3\displaystyle x=1/3.

Sub this into [1] and get ln(2)=2(1/3+(1/3)33+(1/3)55+(1/7)77+)\displaystyle ln(2)=2\left(1/3+\frac{(1/3)^{3}}{3}+\frac{(1/3)^{5}}{5}+\frac{(1/7)^{7}}{7}+\cdot\cdot\cdot\right)

This gives ln(2)=.6931 to four decimal places.

We could just let x=1 in the series for ln(1+x), but it converges too slow to be of any real computational value.
 
Thank you so much to the two of you. It really helped me understand how to do Maclaurin Series.
 
soroban & lookagain edit said:
\(\displaystyle \ \ \text{Then: }\;1 - \ln(1+x) \;=\;1 - x + \frac{x^2}{2} - \frac{x^3}{3} + \frac{x^4}{4} - \hdots\)

\(\displaystyle 1) \ \ \text{Hence: }\;\frac{1 - \ln(1+x)}{x} \;=\;\frac{1}{x} - \frac{x}{2} - \frac{x^2}{3} + \frac{x^3}{4} - \hdots\)


\(\displaystyle 2) \ \ \text{Therefore: }\;f(x) \;=\;\int\left(\frac{1}{x} - \frac{x}{2} - \frac{x^2}{3} + \frac{x^3}{4} - \hdots\right)\,dx\)

. . . . . . . . . . . . \(\displaystyle 3) \ \ =\;\ln x - x + \frac{x^2}{2^2} - \frac{x^3}{3^2} + \frac{x^4}{4^2} - \hdots\)

Going back to this post, while continue having the post of galactus
in the front of the mind, make these changes:


\(\displaystyle 1) \ \ \text{Hence: }\;\frac{1 - \ln(1+x)}{x} \;=\;\frac{1}{x} -1 + \frac{x}{2} - \frac{x^2}{3} + \frac{x^3}{4} - \hdots\)


\(\displaystyle 2) \ \ \text{Therefore: }\;f(x) \;=\;\int\left(\frac{1}{x} - 1 + \frac{x}{2} - \frac{x^2}{3} + \frac{x^3}{4} - \hdots\right)\,dx\)

. . . . . . . . . . . . \(\displaystyle 3) \ \ =\;\ln|x| - x + \frac{x^2}{2^2} - \frac{x^3}{3^2} + \frac{x^4}{4^2} - \hdots \ + C\)
 
Top