Figure 5.6: Maclaurin Polynomial Approximations Converging to sin(x)
1. The Maclaurin Series Definition (Topic 5.18)
A function $f(x)$ that is infinitely differentiable on an open interval containing $x = 0$ can be represented as a power series called its Maclaurin series:
$$f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!} \, x^n = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \dots + \frac{f^{(n)}(0)}{n!}x^n + \dots$$The polynomial formed by truncating after the $n$-th degree term is denoted $P_n(x)$ and provides a local polynomial approximation around $x = 0$.
2. Standard Series in the IB Formula Booklet
The following standard Maclaurin series and their intervals of convergence are provided in the IB Mathematics AA HL Formula Booklet:
Exponential & Logarithmic
$$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \dots \quad (\forall x \in \mathbb{R})$$ $$\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \dots \quad (-1 < x \le 1)$$Trigonometric & Inverse Trig
$$\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \dots \quad (\forall x \in \mathbb{R})$$ $$\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \dots \quad (\forall x \in \mathbb{R})$$ $$\arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \dots \quad (|x| \le 1)$$3. Algebraic Operations & Fast Synthesis
In IB exams, you should rarely compute higher derivatives from scratch if a function can be synthesized from the standard booklet series:
- Composite Substitution: Replace $x$ with an algebraic argument $g(x)$. For example: $$\cos(3x) = 1 - \frac{(3x)^2}{2!} + \frac{(3x)^4}{4!} - \dots = 1 - \frac{9x^2}{2} + \frac{27x^4}{8} - \dots$$
- Series Multiplication (Cauchy Product): When expanding $f(x) \cdot g(x)$, write out each series up to the highest required power and collect like terms: $$e^x \sin x = \left(1 + x + \frac{x^2}{2} + \dots\right)\left(x - \frac{x^3}{6} + \dots\right) = x + x^2 + \frac{x^3}{3} + \dots$$
- Term-by-Term Differentiation & Integration: Power series can be differentiated or integrated term-by-term within their radius of convergence without changing the radius.
- Evaluating Indeterminate Limits: Replace functions with their series approximations to immediately cancel leading powers of $x$.
4. Taylor Series Centered at $x = a \neq 0$ (Syllabus 5.18)
When approximating a function near a point $a \neq 0$, the general Taylor series is used:
$$f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!} (x - a)^n = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \frac{f'''(a)}{3!}(x - a)^3 + \dots$$Examiner Tip for Taylor Expansions: You can also expand in powers of $(x - a)$ by substituting $x = a + u$ into $f(x)$, computing the Maclaurin series in $u$, and then replacing $u$ with $(x - a)$.
5. Estimation of Definite Integrals & Error Bounding
Functions that have no elementary antiderivatives (such as $\int e^{-x^2} dx$, $\int \frac{\sin x}{x} dx$, and $\int \sqrt{1 + x^3} dx$) can be integrated term-by-term using their Maclaurin series:
$$\int_0^{0.5} e^{-x^2} dx = \int_0^{0.5} \left(1 - x^2 + \frac{x^4}{2} - \frac{x^6}{6} + \dots\right) dx = \left[ x - \frac{x^3}{3} + \frac{x^5}{10} - \frac{x^7}{42} \right]_0^{0.5}$$Alternating Series Remainder Theorem: If a series has alternating signs and monotonically decreasing terms with limit 0, the error in truncating the series after $N$ terms is strictly bounded by the magnitude of the first omitted term: $|\text{Error}| \le |a_{N+1}|$.
Worked Examples
Worked Example 1: Taylor Series Centered at $x = 1$
Find the Taylor series expansion for $f(x) = \frac{1}{x}$ in ascending powers of $(x - 1)$ up to and including the term in $(x - 1)^3$.
Solution:
1. Compute derivatives of $f(x) = x^{-1}$ and evaluate at $a = 1$:
$$f(x) = x^{-1} \implies f(1) = 1 \quad \text{[A1]}$$ $$f'(x) = -x^{-2} \implies f'(1) = -1 \quad \text{[A1]}$$ $$f''(x) = 2x^{-3} \implies f''(1) = 2 \quad \text{[A1]}$$ $$f'''(x) = -6x^{-4} \implies f'''(1) = -6 \quad \text{[A1]}$$2. Assemble using Taylor's formula $f(x) = \sum_{n=0}^3 \frac{f^{(n)}(1)}{n!} (x - 1)^n$: [M1]
$$f(x) = 1 - 1(x - 1) + \frac{2}{2!}(x - 1)^2 - \frac{6}{3!}(x - 1)^3 + \dots$$ $$f(x) = 1 - (x - 1) + (x - 1)^2 - (x - 1)^3 + \dots \quad \text{[A1]}$$Worked Example 2: Non-Elementary Definite Integral Estimation
(a) Find the Maclaurin series for $\sin(x^2)$ up to the term in $x^6$.
(b) Hence estimate $\int_0^{0.5} \sin(x^2) dx$ to 4 decimal places.
Solution:
(a) Standard Maclaurin series for $\sin u = u - \frac{u^3}{6} + \mathcal{O}(u^5)$. [M1]
Substitute $u = x^2$:
(b) Integrate term-by-term:
$$\int_0^{0.5} \sin(x^2) dx \approx \int_0^{0.5} \left(x^2 - \frac{x^6}{6}\right) dx = \left[ \frac{x^3}{3} - \frac{x^7}{42} \right]_0^{0.5} \quad \text{[M1]}$$ $$= \frac{(0.5)^3}{3} - \frac{(0.5)^7}{42} = \frac{0.125}{3} - \frac{0.0078125}{42} \quad \text{[M1]}$$ $$= 0.0416667 - 0.0001860 = 0.0414807 \approx 0.0415 \quad \text{[A1]}$$Worked Example 3: Initial Value Problem via Series
Consider the differential equation $\frac{dy}{dx} = x^2 + y$ with initial condition $y(0) = 2$.
Find the Maclaurin polynomial of degree 3 for $y(x)$.
Solution:
1. At $x = 0$, $y(0) = 2$.
From the differential equation:
2. Differentiate both sides of $\frac{dy}{dx} = x^2 + y$ with respect to $x$:
$$y''(x) = 2x + y'(x) \quad \text{[M1]}$$ $$y''(0) = 2(0) + y'(0) = 0 + 2 = 2 \quad \text{[A1]}$$3. Differentiate again with respect to $x$:
$$y'''(x) = 2 + y''(x) \quad \text{[M1]}$$ $$y'''(0) = 2 + y''(0) = 2 + 2 = 4 \quad \text{[A1]}$$4. Assemble the Maclaurin polynomial $P_3(x) = y(0) + y'(0)x + \frac{y''(0)}{2!}x^2 + \frac{y'''(0)}{3!}x^3$: [M1]
$$P_3(x) = 2 + 2x + \frac{2}{2!}x^2 + \frac{4}{3!}x^3 = 2 + 2x + x^2 + \frac{2}{3}x^3 \quad \text{[A1]}$$Worked Example 4: Maclaurin Expansion via Series Multiplication & Division (Paper 1 Standard)
Find the Maclaurin expansion of $f(x) = \frac{e^x}{1 + x}$ up to and including the term in $x^3$. [5 marks]
Solution:
1. Write standard series up to degree 3:
$$e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \dots \quad [A1]$$ $$\frac{1}{1 + x} = (1 + x)^{-1} = 1 - x + x^2 - x^3 + \dots \quad \text{for } |x| < 1 \quad [A1]$$2. Multiply polynomials and group by powers of $x$ up to $x^3$:
$$\frac{e^x}{1 + x} = \left( 1 + x + \frac{x^2}{2} + \frac{x^3}{6} \right)\left( 1 - x + x^2 - x^3 \right) + \mathcal{O}(x^4) \quad [M1]$$Constant term: $1 \times 1 = 1$.
$x$ term: $1(-x) + x(1) = 0$.
$x^2$ term: $1(x^2) + x(-x) + \frac{x^2}{2}(1) = x^2 - x^2 + \frac{1}{2}x^2 = \frac{1}{2}x^2$.
$x^3$ term: $1(-x^3) + x(x^2) + \frac{x^2}{2}(-x) + \frac{x^3}{6}(1) = -1 + 1 - \frac{1}{2} + \frac{1}{6} = -\frac{2}{6} = -\frac{1}{3}$. [M1]
Worked Example 5: Indeterminate Limits via Maclaurin Expansions (Paper 1 Standard)
Using Maclaurin series expansions, evaluate $\lim_{x \to 0} \frac{x - \sin x}{x(e^{2x} - 1 - 2x)}$. [5 marks]
Solution:
1. Expand numerator using $\sin x = x - \frac{x^3}{6} + \frac{x^5}{120} - \dots$:
$$x - \sin x = x - \left( x - \frac{x^3}{6} + \dots \right) = \frac{x^3}{6} + \mathcal{O}(x^5) \quad [M1][A1]$$2. Expand denominator using $e^{2x} = 1 + 2x + \frac{(2x)^2}{2!} + \frac{(2x)^3}{3!} + \dots = 1 + 2x + 2x^2 + \frac{4}{3}x^3 + \dots$:
$e^{2x} - 1 - 2x = 2x^2 + \frac{4}{3}x^3 + \dots \quad [M1]$ $x(e^{2x} - 1 - 2x) = x(2x^2 + \dots) = 2x^3 + \dots$3. Evaluate the limit:
$\lim_{x \to 0} \frac{x - \sin x}{x(e^{2x} - 1 - 2x)} = \lim_{x \to 0} \frac{\frac{x^3}{6} + \dots}{2x^3 + \dots} = \frac{1/6}{2} = \frac{1}{12} \quad [A1]$Examiner Commentary: Series expansion eliminates the need for applying l'Hôpital's rule multiple times in sequence, which frequently leads to algebraic exhaustion and differentiation errors.
Practice Exercises (10 Tiered Questions)
Try these 10 exam-style questions, from core skills to harder problems. Open each question to view its solution.
Use the Maclaurin formula $f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!} x^n$ to derive the first three non-zero terms of $f(x) = \cos(2x)$.
View Full Algebraic Solution
Step 1: Compute derivatives and evaluate at $x = 0$:
$$f(x) = \cos(2x) \implies f(0) = 1$$ $$f'(x) = -2\sin(2x) \implies f'(0) = 0$$ $$f''(x) = -4\cos(2x) \implies f''(0) = -4$$ $$f'''(x) = 8\sin(2x) \implies f'''(0) = 0$$ $$f^{(4)}(x) = 16\cos(2x) \implies f^{(4)}(0) = 16$$Step 2: Assemble Maclaurin series:
$$f(x) = 1 + 0x + \frac{-4}{2!}x^2 + 0x^3 + \frac{16}{4!}x^4 + \dots$$ $$f(x) = 1 - 2x^2 + \frac{2}{3}x^4 + \dots$$Using the standard series for $e^u$, write down the Maclaurin expansion of $e^{-3x^2}$ up to the term in $x^4$.
View Full Algebraic Solution
Step 1: Standard expansion:
$$e^u = 1 + u + \frac{u^2}{2!} + \dots$$Step 2: Substitute $u = -3x^2$:
$$e^{-3x^2} = 1 + (-3x^2) + \frac{(-3x^2)^2}{2!} + \dots = 1 - 3x^2 + \frac{9x^4}{2} - \dots$$Find the Maclaurin series for $\ln(1 + 2x)$ up to the term in $x^3$, and state the interval of convergence.
View Full Algebraic Solution
Step 1: Standard booklet series:
$$\ln(1 + u) = u - \frac{u^2}{2} + \frac{u^3}{3} - \dots \quad \text{for } -1 < u \le 1$$Step 2: Substitute $u = 2x$:
$$\ln(1 + 2x) = (2x) - \frac{(2x)^2}{2} + \frac{(2x)^3}{3} - \dots = 2x - 2x^2 + \frac{8}{3}x^3 - \dots$$Step 3: Interval of convergence:
$$-1 < 2x \le 1 \implies -\frac{1}{2} < x \le \frac{1}{2}$$Find the Maclaurin expansion of $f(x) = e^x \sin x$ up to and including the term in $x^3$.
View Full Algebraic Solution
Step 1: Write series for each component up to $x^3$:
$$e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \dots$$ $$\sin x = x - \frac{x^3}{6} + \dots$$Step 2: Multiply and collect terms up to degree 3:
$$e^x \sin x = \left( 1 + x + \frac{x^2}{2} \right) \left( x - \frac{x^3}{6} \right) + \mathcal{O}(x^4)$$ $$= 1(x) - 1\left(\frac{x^3}{6}\right) + x(x) + \left(\frac{x^2}{2}\right)(x) + \dots$$ $$= x - \frac{x^3}{6} + x^2 + \frac{x^3}{2}$$Combine $x^3$ coefficients: $-\frac{1}{6} + \frac{1}{2} = \frac{2}{6} = \frac{1}{3}$.
$$e^x \sin x = x + x^2 + \frac{1}{3}x^3 + \dots$$Use the Maclaurin series for $\cos x$ and $e^x$ to evaluate $\lim_{x \to 0} \frac{1 - \cos(3x)}{x(e^{2x} - 1)}$.
View Full Algebraic Solution
Step 1: Expand numerator:
$$\cos(3x) = 1 - \frac{(3x)^2}{2} + \dots = 1 - \frac{9}{2}x^2 + \dots$$ $$1 - \cos(3x) = \frac{9}{2}x^2 + \dots$$Step 2: Expand denominator:
$$e^{2x} - 1 = (1 + 2x + \dots) - 1 = 2x + \dots$$ $$x(e^{2x} - 1) = x(2x + \dots) = 2x^2 + \dots$$Step 3: Evaluate limit:
$$\lim_{x \to 0} \frac{\frac{9}{2}x^2 + \dots}{2x^2 + \dots} = \frac{9/2}{2} = \frac{9}{4}$$Find the Taylor series of $f(x) = \ln x$ in powers of $(x - 1)$ up to the third degree term.
View Full Algebraic Solution
Step 1: Evaluate derivatives at $x = 1$:
$$f(1) = \ln 1 = 0$$ $$f'(x) = x^{-1} \implies f'(1) = 1$$ $$f''(x) = -x^{-2} \implies f''(1) = -1$$ $$f'''(x) = 2x^{-3} \implies f'''(1) = 2$$Step 2: Apply Taylor series formula around $a = 1$:
$$f(x) = f(1) + f'(1)(x-1) + \frac{f''(1)}{2!}(x-1)^2 + \frac{f'''(1)}{3!}(x-1)^3 + \dots$$ $$f(x) = 0 + 1(x-1) - \frac{1}{2}(x-1)^2 + \frac{2}{6}(x-1)^3 + \dots$$ $$f(x) = (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{3}(x-1)^3 - \dots$$Use the first three non-zero terms of the Maclaurin series for $e^{-x^2}$ to approximate the definite integral $\int_0^{0.5} e^{-x^2} dx$, and give your answer to 5 decimal places.
View Full Algebraic Solution
Step 1: Write the Maclaurin expansion of $e^{-x^2}$:
$$e^{-x^2} = 1 - x^2 + \frac{x^4}{2} - \dots$$Step 2: Integrate term by term:
$$\int_0^{0.5} \left( 1 - x^2 + \frac{x^4}{2} \right) dx = \left[ x - \frac{x^3}{3} + \frac{x^5}{10} \right]_0^{0.5}$$Step 3: Evaluate at $x = 0.5 = \frac{1}{2}$:
$$= \frac{1}{2} - \frac{1}{3}\left(\frac{1}{8}\right) + \frac{1}{10}\left(\frac{1}{32}\right) = \frac{1}{2} - \frac{1}{24} + \frac{1}{320}$$ $$= 0.5 - 0.041667 + 0.003125 = 0.461458 \dots \approx 0.46146$$Given that $y = f(x)$ satisfies the differential equation $\frac{dy}{dx} = x^2 + y^2$ with initial condition $y(0) = 1$, find the Maclaurin series for $y$ up to the term in $x^3$.
View Full Algebraic Solution
Step 1: Initial values:
$$y(0) = 1$$ $$y'(0) = 0^2 + (y(0))^2 = 0 + 1^2 = 1$$Step 2: Differentiate implicitly to find higher derivatives:
$$y'' = \frac{d}{dx}[x^2 + y^2] = 2x + 2y y'$$ $$y''(0) = 2(0) + 2(1)(1) = 2$$Step 3: Third derivative:
$$y''' = \frac{d}{dx}[2x + 2y y'] = 2 + 2(y')^2 + 2y y''$$ $$y'''(0) = 2 + 2(1)^2 + 2(1)(2) = 2 + 2 + 4 = 8$$Step 4: Assemble series:
$$y(x) = y(0) + y'(0)x + \frac{y''(0)}{2!}x^2 + \frac{y'''(0)}{3!}x^3 + \dots$$ $$y(x) = 1 + x + \frac{2}{2}x^2 + \frac{8}{6}x^3 + \dots = 1 + x + x^2 + \frac{4}{3}x^3 + \dots$$By substituting $x = i\theta$ into the Maclaurin expansion of $e^x$, separate the real and imaginary parts to prove Euler’s formula: $e^{i\theta} = \cos\theta + i\sin\theta$.
View Full Algebraic Solution
Step 1: Expand $e^{i\theta}$ using the standard series:
$$e^{i\theta} = 1 + (i\theta) + \frac{(i\theta)^2}{2!} + \frac{(i\theta)^3}{3!} + \frac{(i\theta)^4}{4!} + \frac{(i\theta)^5}{5!} + \dots$$Step 2: Simplify powers of $i$:
$i^1 = i, \, i^2 = -1, \, i^3 = -i, \, i^4 = 1, \, i^5 = i, \dots$
$$e^{i\theta} = 1 + i\theta - \frac{\theta^2}{2!} - i\frac{\theta^3}{3!} + \frac{\theta^4}{4!} + i\frac{\theta^5}{5!} - \dots$$Step 3: Group into real and imaginary components:
$$\text{Re} = 1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \dots = \cos\theta$$ $$\text{Im} = \theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \dots = \sin\theta$$ $$e^{i\theta} = \cos\theta + i\sin\theta \quad \blacksquare$$Show that the Maclaurin series for $\sec x$ up to $x^4$ is $1 + \frac{1}{2}x^2 + \frac{5}{24}x^4 + \dots$ by performing long division of series $\frac{1}{\cos x}$ or using the identity $\sec x \cos x = 1$.
View Full Algebraic Solution
Step 1: Write $\cos x$ and let $\sec x = a_0 + a_2 x^2 + a_4 x^4 + \dots$:
Since $\sec x$ is an even function, all odd-degree terms vanish.
$$\cos x = 1 - \frac{x^2}{2} + \frac{x^4}{24} - \dots$$Step 2: Multiply series and set equal to 1:
$$\left( a_0 + a_2 x^2 + a_4 x^4 + \dots \right) \left( 1 - \frac{x^2}{2} + \frac{x^4}{24} - \dots \right) = 1$$Step 3: Equate coefficients of powers of $x$:
Constant term: $a_0 \cdot 1 = 1 \implies a_0 = 1$
$x^2$ coefficient: $a_2 - \frac{1}{2}a_0 = 0 \implies a_2 = \frac{1}{2}(1) = \frac{1}{2}$
$x^4$ coefficient: $a_4 - \frac{1}{2}a_2 + \frac{1}{24}a_0 = 0$
$$a_4 = \frac{1}{2}a_2 - \frac{1}{24}a_0 = \frac{1}{2}\left(\frac{1}{2}\right) - \frac{1}{24}(1) = \frac{1}{4} - \frac{1}{24} = \frac{6 - 1}{24} = \frac{5}{24}$$Step 4: Final expansion:
$$\sec x = 1 + \frac{1}{2}x^2 + \frac{5}{24}x^4 + \dots \quad \blacksquare$$Formula Booklet Reference
Official IB Formula Booklet Entries
- Maclaurin Series: $f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \dots = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}x^n$
- Taylor Series about x = a: $f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \dots$
- $e^x = 1 + x + \frac{x^2}{2!} + \dots$
- $\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \dots \quad (|x| < 1)$
- $\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \dots$
- $\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \dots$
- $\arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \dots \quad (|x| \le 1)$
Common Exam Pitfalls
Pitfall: Factorial vs Constant Denominators
Notice that the series for $\sin x, \cos x$, and $e^x$ have factorials in the denominators ($3! = 6, 4! = 24$), whereas $\ln(1+x)$ and $\arctan x$ have plain integers ($2, 3, 4, 5$). Confusing these is a frequent loss of marks.
Pitfall: Valid Range of Convergence
The expansions for $\ln(1+x)$ and $\arctan x$ are only valid when $|x| \le 1$. If asked for $\ln(3+x)$, factor out 3 first: $\ln 3 + \ln(1 + x/3)$, with $|x/3| < 1$.
Topic Diagnostic Test
Complete this timed test to check your understanding and exam technique.
Section A: Diagnostic Multiple Choice Questions
What is the coefficient of $x^3$ in the Maclaurin expansion of $f(x) = \sin(2x)$?
What is the value of $\lim_{x \to 0} \frac{e^{x^2} - 1 - x^2}{x^4}$ evaluated using series expansions?
Which function has the Maclaurin series $\sum_{n=0}^\infty (-1)^n x^{2n} = 1 - x^2 + x^4 - x^6 + \dots$ for $|x| < 1$?
If $P_2(x) = 3 - 4x + 5x^2$ is the second-degree Maclaurin polynomial for $f(x)$, what is $f''(0)$?
Section B: Examination-Style Free Response Questions
Let $f(x) = \frac{\sin x}{x}$ for $x \ne 0$, and $f(0) = 1$.
(a) Write down the Maclaurin expansion of $f(x)$ up to the term in $x^4$. [2 marks]
(b) Hence, approximate $\int_0^1 \frac{\sin x}{x} dx$ using these terms. [3 marks]
(c) Explain why this approximation is strictly an overestimate or underestimate. [2 marks]
View Official IB Markscheme
(a) Series expansion:
$$\sin x = x - \frac{x^3}{6} + \frac{x^5}{120} - \dots \quad \text{[M1]}$$ $$f(x) = \frac{\sin x}{x} = 1 - \frac{x^2}{6} + \frac{x^4}{120} - \dots \quad \text{[A1]}$$(b) Integrate term by term:
$$\int_0^1 \left( 1 - \frac{x^2}{6} + \frac{x^4}{120} \right) dx = \left[ x - \frac{x^3}{18} + \frac{x^5}{600} \right]_0^1 \quad \text{[M1][A1]}$$ $$= 1 - \frac{1}{18} + \frac{1}{600} = 1 - 0.055556 + 0.001667 \approx 0.94611 \quad \text{[A1]}$$(c) Alternating series remainder:
The series is an alternating series with monotonically decreasing terms. The next omitted term is negative ($-\int_0^1 \frac{x^6}{5040}dx = -\frac{1}{35280}$), so the truncated sum is an overestimate [R1][A1].
Consider the function $g(x) = \ln(1 + x) - x\cos x$.
(a) Find the Maclaurin expansion of $g(x)$ up to the term in $x^3$. [4 marks]
(b) Hence, determine the value of $\lim_{x \to 0} \frac{g(x)}{x^3}$. [3 marks]
View Official IB Markscheme
(a) Maclaurin series for each term:
$$\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \dots \quad \text{[M1][A1]}$$ $$\cos x = 1 - \frac{x^2}{2} + \dots \implies x\cos x = x - \frac{x^3}{2} + \dots \quad \text{[M1]}$$ $$g(x) = \left( x - \frac{x^2}{2} + \frac{x^3}{3} \right) - \left( x - \frac{x^3}{2} \right) + \dots$$ $$g(x) = -\frac{1}{2}x^2 + \left( \frac{1}{3} + \frac{1}{2} \right)x^3 + \dots = -\frac{1}{2}x^2 + \frac{5}{6}x^3 + \dots \quad \text{[A1]}$$(b) Limit calculation:
Notice the lowest degree non-zero term in $g(x)$ is $-\frac{1}{2}x^2$:
$$\frac{g(x)}{x^3} = \frac{-\frac{1}{2}x^2 + \frac{5}{6}x^3 + \dots}{x^3} = -\frac{1}{2x} + \frac{5}{6} + \dots \quad \text{[M1]}$$As $x \to 0$, $-\frac{1}{2x} \to \pm\infty$, so the two-sided limit does not exist (diverges) [A2].
(Note: if evaluating $\lim_{x \to 0} \frac{g(x)}{x^2}$, the limit would be $-\frac{1}{2}$.)