Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Exercise 7.9 · Q6: ∫02dxx+4−x2\int_0^2\frac{dx}{x+4-x^2}

Exercise 7.9Definite integrals by substitution · Section 7.9
The question

Evaluate the integral using substitution:

∫02dxx+4−x2.\int_0^2 \frac{dx}{x + 4 - x^2}.
Exam answer

Let I=∫02dxx+4−x2I = \displaystyle\int_0^2\frac{dx}{x + 4 - x^2}⁠.

x+4−x2=174−(x−12)2x + 4 - x^2 = \frac{17}{4} - \left(x - \frac12\right)^2

Put x−12=tx - \frac12 = t⁠. Then dx=dtdx = dt⁠.

When x=0x = 0⁠, t=−12t = -\frac12⁠; when x=2x = 2⁠, t=32t = \frac32⁠.

∴ I=∫−1232dt(172)2−t2\therefore\ I = \int_{-\frac12}^{\frac32}\frac{dt}{\left(\frac{\sqrt{17}}{2}\right)^2 - t^2}

Using ∫dta2−t2=12alog⁡∣a+ta−t∣\displaystyle\int\frac{dt}{a^2 - t^2} = \frac{1}{2a}\log\left|\frac{a + t}{a - t}\right| with a=172a = \frac{\sqrt{17}}{2}⁠,

I=117[log⁡∣17+2t17−2t∣]−1232=117(log⁡17+317−3−log⁡17−117+1)=117log⁡(17+317−3⋅17+117−1)\begin{aligned} I &= \frac{1}{\sqrt{17}}\left[\log\left|\frac{\sqrt{17} + 2t}{\sqrt{17} - 2t}\right|\right]_{-\frac12}^{\frac32} \\ &= \frac{1}{\sqrt{17}}\bigg(\log\frac{\sqrt{17} + 3}{\sqrt{17} - 3} \\ &\qquad - \log\frac{\sqrt{17} - 1}{\sqrt{17} + 1}\bigg) \\ &= \frac{1}{\sqrt{17}}\log\bigg(\frac{\sqrt{17} + 3}{\sqrt{17} - 3} \\ &\qquad \cdot\frac{\sqrt{17} + 1}{\sqrt{17} - 1}\bigg) \end{aligned}

Rationalising each fraction,

I=117log⁡(13+3174⋅9+178)=117log⁡168+401732\begin{aligned} I &= \frac{1}{\sqrt{17}}\log\bigg(\frac{13 + 3\sqrt{17}}{4} \\ &\qquad \cdot\frac{9 + \sqrt{17}}{8}\bigg) \\ &= \frac{1}{\sqrt{17}}\log\frac{168 + 40\sqrt{17}}{32} \end{aligned}

∴ I=117log⁡21+5174\therefore\ I = \dfrac{1}{\sqrt{17}}\log\dfrac{21 + 5\sqrt{17}}{4}⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Completing the square turns the denominator into "a constant minus a square": x+4−x2=174−(x−12)2x + 4 - x^2 = \frac{17}{4} - \left(x - \frac{1}{2}\right)^2⁠. The shift t=x−12t = x - \frac{1}{2} gives ∫dta2−t2\int\frac{dt}{a^2 - t^2} with a=172a = \frac{\sqrt{17}}{2}⁠, a standard logarithm formula. The denominator stays positive on [0,2][0, 2]⁠, so the formula applies on the whole interval.

Given, to find, and the plan
Given
The integrand 1x+4−x2\frac{1}{x + 4 - x^2} on [0,2][0, 2]⁠.
To find
The exact value of the integral, and a decimal.
Plan
(1) Complete the square and check the denominator is never 0 on [0,2][0, 2]⁠. (2) Substitute t=x−12t = x - \frac{1}{2} and change the limits. (3) Use ∫dta2−t2\int\frac{dt}{a^2 - t^2}⁠. (4) Evaluate and simplify the logarithms to the book's form. (5) Check by differentiating an antiderivative in xx⁠, and numerically.

Basics you need

1Completing the square

x2−x=(x−12)2−14x^2 - x = \left(x - \frac{1}{2}\right)^2 - \frac{1}{4}⁠. Basics: completing the square

2The formula for 1a2−t2\frac{1}{a^2 - t^2}

∫dta2−t2=12alog⁡∣a+ta−t∣+C\int\frac{dt}{a^2 - t^2} = \frac{1}{2a}\log\left|\frac{a + t}{a - t}\right| + C (Section 7.4, formula (2)). Lesson: integrals of particular functions

3Laws of logarithms

log⁡A−log⁡B=log⁡AB\log A - \log B = \log\frac{A}{B} and −log⁡AB=log⁡BA-\log\frac{A}{B} = \log\frac{B}{A}⁠. Basics: logarithms

4Rationalising

17+317−3=(17+3)217−9\frac{\sqrt{17} + 3}{\sqrt{17} - 3} = \frac{(\sqrt{17} + 3)^2}{17 - 9} (multiply top and bottom by 17+3\sqrt{17} + 3⁠). Basics: working with fractions

Solution

  1. Complete the square and check the denominator

    x+4−x2=4−(x2−x)=4−[(x−12)2−14]=174−(x−12)2.\begin{aligned}x + 4 - x^2 &= 4 - \left(x^2 - x\right) \\ &= 4 - \left[\left(x - \tfrac{1}{2}\right)^2 - \tfrac{1}{4}\right] \\ &= \tfrac{17}{4} - \left(x - \tfrac{1}{2}\right)^2.\end{aligned}

    For 0≤x≤20 \le x \le 2⁠, −12≤x−12≤32-\frac{1}{2} \le x - \frac{1}{2} \le \frac{3}{2}⁠, so (x−12)2≤94\left(x - \frac{1}{2}\right)^2 \le \frac{9}{4} and

    x+4−x2≥174−94=2>0.x + 4 - x^2 \ge \frac{17}{4} - \frac{9}{4} = 2 > 0.

    So the integrand is continuous on [0,2][0, 2]⁠.

    The denominator is 0 at x=1±172x = \frac{1 \pm \sqrt{17}}{2}⁠, about −1.56-1.56 and 2.562.56⁠. Both lie outside [0,2][0, 2] (the figure shows the one at 2.56), so the fundamental theorem can be used. The bound shows this without decimals.
    Half the coefficient of xx is −12-\frac{1}{2}⁠; its square 14\frac{1}{4} is added and subtracted. Basics: completing the square
  2. Substitute t=x−12t = x - \frac{1}{2} and change the limits

    Then dt=dxdt = dx⁠. Write a=172a = \frac{\sqrt{17}}{2}⁠, so a2=174a^2 = \frac{17}{4} and the denominator is a2−t2a^2 - t^2⁠.

    New limits. When x=0x = 0⁠, t=−12t = -\frac{1}{2}⁠. When x=2x = 2⁠, t=32t = \frac{3}{2}⁠.

    ∫02dxx+4−x2=∫−1232dta2−t2.\int_0^2\frac{dx}{x + 4 - x^2} = \int_{-\frac{1}{2}}^{\frac{3}{2}}\frac{dt}{a^2 - t^2}.

    Why it is valid on the whole interval. t=x−12t = x - \frac{1}{2} is a shift: increasing, with derivative 1. Every tt in [−12,32]\left[-\frac{1}{2}, \frac{3}{2}\right] has ∣t∣≤32<a≈2.06|t| \le \frac{3}{2} < a \approx 2.06⁠, so a2−t2>0a^2 - t^2 > 0 throughout.

    After completing the square the expression depends on xx only through x−12x - \frac{1}{2}⁠; naming it tt gives exactly the shape of a standard formula.
    17≈4.1231056\sqrt{17} \approx 4.1231056⁠, so a≈2.0615528a \approx 2.0615528⁠. Basics: substitution
  3. Apply the formula for 1a2−t2\frac{1}{a^2 - t^2}

    With 12a=117\frac{1}{2a} = \frac{1}{\sqrt{17}}⁠:

    ∫dta2−t2=117log⁡∣a+ta−t∣+C.\int\frac{dt}{a^2 - t^2} = \frac{1}{\sqrt{17}}\log\left|\frac{a + t}{a - t}\right| + C.

    Since ∣t∣<a|t| < a on our interval, both a+ta + t and a−ta - t are positive and the modulus can be dropped.

    Section 7.4 formula (2) comes from splitting 1a2−t2=12a(1a−t+1a+t)\frac{1}{a^2 - t^2} = \frac{1}{2a}\left(\frac{1}{a - t} + \frac{1}{a + t}\right) and integrating each part to a logarithm.
  4. Evaluate at the two limits

    Multiply top and bottom of a+ta−t\frac{a + t}{a - t} by 2, so aa becomes 17\sqrt{17} and tt becomes 2t2t⁠:

    At t=32t = \frac{3}{2}⁠: 17+317−3\frac{\sqrt{17} + 3}{\sqrt{17} - 3}⁠. At t=−12t = -\frac{1}{2}⁠: 17−117+1\frac{\sqrt{17} - 1}{\sqrt{17} + 1}⁠.

    I=117[log⁡17+317−3−log⁡17−117+1]=117[log⁡17+317−3+log⁡17+117−1].\begin{aligned}I &= \frac{1}{\sqrt{17}}\left[\log\frac{\sqrt{17} + 3}{\sqrt{17} - 3} - \log\frac{\sqrt{17} - 1}{\sqrt{17} + 1}\right] \\ &= \frac{1}{\sqrt{17}}\left[\log\frac{\sqrt{17} + 3}{\sqrt{17} - 3} + \log\frac{\sqrt{17} + 1}{\sqrt{17} - 1}\right].\end{aligned}
    Theorem 2: value at the upper limit minus value at the lower limit. Subtracting log⁡AB\log\frac{A}{B} is adding log⁡BA\log\frac{B}{A}⁠.
    −log⁡AB=log⁡BA-\log\frac{A}{B} = \log\frac{B}{A}⁠. Basics: logarithms
  5. Simplify to the book's form

    Rationalise each fraction:

    17+317−3=(17+3)217−9=26+6178=13+3174,\begin{aligned}\frac{\sqrt{17} + 3}{\sqrt{17} - 3} &= \frac{(\sqrt{17} + 3)^2}{17 - 9} = \frac{26 + 6\sqrt{17}}{8} \\ &= \frac{13 + 3\sqrt{17}}{4},\end{aligned} 17+117−1=(17+1)217−1=18+21716=9+178.\begin{aligned}\frac{\sqrt{17} + 1}{\sqrt{17} - 1} &= \frac{(\sqrt{17} + 1)^2}{17 - 1} = \frac{18 + 2\sqrt{17}}{16} \\ &= \frac{9 + \sqrt{17}}{8}.\end{aligned}

    Add the logarithms by multiplying:

    13+3174⋅9+178=117+1317+2717+5132=168+401732=21+5174.\begin{aligned}\frac{13 + 3\sqrt{17}}{4}\cdot\frac{9 + \sqrt{17}}{8} &= \frac{117 + 13\sqrt{17} + 27\sqrt{17} + 51}{32} \\ &= \frac{168 + 40\sqrt{17}}{32} = \frac{21 + 5\sqrt{17}}{4}.\end{aligned}

    Therefore

    I=117log⁡21+5174.I = \frac{1}{\sqrt{17}}\log\frac{21 + 5\sqrt{17}}{4}.

    In decimals: 21+5174≈10.4038820\frac{21 + 5\sqrt{17}}{4} \approx 10.4038820⁠, its logarithm is about 2.342179009, and dividing by 17≈4.123105626\sqrt{17} \approx 4.123105626 gives I≈0.5680618I \approx 0.5680618⁠. (Nine decimals are kept here because 2.3421790 divided by 4.1231056 would round to 0.5680619.)

    (17+3)2=17+617+9(\sqrt{17} + 3)^2 = 17 + 6\sqrt{17} + 9 and (17+1)2=17+217+1(\sqrt{17} + 1)^2 = 17 + 2\sqrt{17} + 1⁠. In the product, 317⋅17=513\sqrt{17}\cdot\sqrt{17} = 51⁠. Dividing 168+4017168 + 40\sqrt{17} and 32 by 8 gives 21+5174\frac{21 + 5\sqrt{17}}{4}⁠.
    log⁡A+log⁡B=log⁡(AB)\log A + \log B = \log(AB)⁠; (p+q)2=p2+2pq+q2(p + q)^2 = p^2 + 2pq + q^2⁠. Basics: logarithms
  6. Same result by staying in xx

    With t=x−12t = x - \frac{1}{2}⁠, a+ta−t=17−1+2x17+1−2x\frac{a + t}{a - t} = \frac{\sqrt{17} - 1 + 2x}{\sqrt{17} + 1 - 2x}⁠. So an antiderivative on [0,2][0, 2] is

    F(x)=117log⁡17−1+2x17+1−2x.F(x) = \frac{1}{\sqrt{17}}\log\frac{\sqrt{17} - 1 + 2x}{\sqrt{17} + 1 - 2x}.

    Check: differentiate. Split the logarithm of the quotient:

    F(x)=117[log⁡(17−1+2x)−log⁡(17+1−2x)].\begin{aligned}F(x) = \tfrac{1}{\sqrt{17}}\big[&\log(\sqrt{17} - 1 + 2x) \\ &- \log(\sqrt{17} + 1 - 2x)\big].\end{aligned}

    Each logarithm differentiates to (derivative of the inside) over (the inside):

    F′(x)=117[217−1+2x+217+1−2x]=117⋅2⋅21717−(2x−1)2=417−(4x2−4x+1)=416+4x−4x2=1x+4−x2,\begin{aligned}F'(x) &= \frac{1}{\sqrt{17}}\left[\frac{2}{\sqrt{17} - 1 + 2x} + \frac{2}{\sqrt{17} + 1 - 2x}\right] \\ &= \frac{1}{\sqrt{17}}\cdot\frac{2\cdot 2\sqrt{17}}{17 - (2x - 1)^2} \\ &= \frac{4}{17 - (4x^2 - 4x + 1)} \\ &= \frac{4}{16 + 4x - 4x^2} = \frac{1}{x + 4 - x^2},\end{aligned}

    the integrand.

    The two denominators are 17+(2x−1)\sqrt{17} + (2x - 1) and 17−(2x−1)\sqrt{17} - (2x - 1)⁠; their sum is 2172\sqrt{17} and their product is 17−(2x−1)217 - (2x - 1)^2⁠.
    ddxlog⁡(g(x))=g′(x)g(x)\frac{d}{dx}\log(g(x)) = \frac{g'(x)}{g(x)} for g(x)>0g(x) > 0⁠. Basics: the chain rule backwards
  7. The region

    0.5 1 1.5 2 0.5 1 x y (2, 1/2) area ≈ 0.568 x ≈ 2.56 y = 1 / (x + 4 − x²)
    y=1x+4−x2y = \frac{1}{x + 4 - x^2} is lowest, 417\frac{4}{17}⁠, at x=12x = \frac{1}{2} and equals 12\frac{1}{2} at x=2x = 2⁠. It blows up at x≈2.56x \approx 2.56 (dashed), where the denominator is 0, outside [0,2][0, 2]⁠. The shaded area is about 0.568.
    The integrand stays between 417≈0.235\frac{4}{17} \approx 0.235 and 12\frac{1}{2} on an interval of length 2, so the area is between 0.47 and 1. The value 0.568 fits.
    For a function that is never negative, the definite integral is the area under its graph. Basics: area as a sum of thin strips
Result

∫02dxx+4−x2=117log⁡21+5174≈0.5680618.\int_0^2\frac{dx}{x + 4 - x^2} = \frac{1}{\sqrt{17}}\log\frac{21 + 5\sqrt{17}}{4} \approx 0.5680618. (Textbook answer: 117log⁡21+5174\frac{1}{\sqrt{17}}\log\frac{21 + 5\sqrt{17}}{4}⁠.)

Check it with numbers

A numerical integration of 1x+4−x2\frac{1}{x + 4 - x^2} over [0,2][0, 2] gives 0.5680618. The two rationalised fractions: 13+3174≈6.3423292\frac{13 + 3\sqrt{17}}{4} \approx 6.3423292 and 9+178≈1.6403882\frac{9 + \sqrt{17}}{8} \approx 1.6403882⁠; their product is about 10.403882010.4038820⁠, the same as 21+5174≈10.4038820\frac{21 + 5\sqrt{17}}{4} \approx 10.4038820⁠.

Common mistakes
  1. Sign errors when completing the square. x+4−x2=−(x2−x−4)x + 4 - x^2 = -(x^2 - x - 4)⁠; handle the minus before completing the square, or the result is (x−12)2−174\left(x - \frac{1}{2}\right)^2 - \frac{17}{4} with the wrong sign.
  2. Using the 1x2−a2\frac{1}{x^2 - a^2} formula. The denominator is a2−t2a^2 - t^2 (formula (2)), not t2−a2t^2 - a^2 (formula (1)); the two answers differ by a sign.
  3. Forgetting to check the zeros of the denominator. If the interval had reached the zero x=1+172≈2.56x = \frac{1 + \sqrt{17}}{2} \approx 2.56⁠, the integral would not exist as a definite integral of a continuous function.
What to take away
  1. A quadratic denominator: complete the square, shift, then use one of the formulas of Section 7.4.
  2. Before using a log formula on [a,b][a, b]⁠, check that the denominator has no zero in [a,b][a, b]⁠.
  3. Combine logarithms and rationalise surds to reach the book's form.

Every fact used, and where it comes from

FactUsed inSource
Completing the squareStep 1Algebra; Section 7.4 (Basics)
Substitution (shift) with change of limitsStep 2Section 7.9 (Lesson)
∫dta2−t2=12alog⁡∣a+ta−t∣+C\int\frac{dt}{a^2 - t^2} = \frac{1}{2a}\log\left|\frac{a + t}{a - t}\right| + CStep 3Section 7.4, formula (2) (Lesson)
∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a)Steps 4 and 6Theorem 2, Section 7.8.3 (Lesson)
Laws of logarithms; rationalisingSteps 4 and 5Algebra (Basics)
Derivative of log⁡g(x)\log g(x)Step 6Chapter 5, Sections 5.3.1 and 5.4
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →