Thursday, September 3, 2009

More on the three-fold way


A while ago I posted about what seems to be a simple calculus problem---to find the area of a circle by integration. In fact we looked at three ways, and two were easy. But the first way is harder, and that involves y as a function of x with the goal to integrate y(x) from x = -R to x = R. At the time, I solved the problem by numerical integration.

The function I could not integrate is

y = √(R2 - x2)

or sticking with a unit circle:

y = √(1 - x2)

Reading further in Strang's Calculus, I find that there is a way to do it. The method has two parts: (i) a trigonometric substitution and (ii) integration by parts, which is a reversal of the product rule for differentiation.

Integration by parts


If we have two functions of x, u and v, and we want d/dx of uv, by the product rule we get:

d/dx uv = u dv/dx + v du/dx

Thinking about integrating this (without the x's):

uv = ∫u dv + ∫v du
∫u dv = uv - ∫v du

So the trick is, when given a difficult integral, to try to imagine it transformed into ∫u dv. If ∫v du is easy or just easier, we have helped ourselves. Suppose we have:

∫cos2 x dx
∫cos x cos x dx

Then let

u = cos x
dv = cos x dx
v = sin x
du = -sin x dx

∫cos2 x dx =
= ∫u dv
= uv - ∫v du
= sin x cos x + ∫sin x sin x dx

And a trick:

∫cos2 x dx =
= sin x cos x + ∫(1-cos2 x) dx
= sin x cos x + x - ∫cos2 x dx

And another trick!:

2 ∫cos2 x dx = sin x cos x + x
∫cos2 x dx = 1/2(sin x cos x + x)

Amazing. And:

∫sin2 x dx =
= ∫ (1 - cos2 x) dx
= x - 1/2(sin x cos x + x)
= 1/2(x - sin x cos x)


The "double angle" method


I quoted Strang the other day that:

sin(s + t) = sin s cos t + cos s sin t
cos(s + t) = cos s cos t - sin s sin t

These formulas lead to a pretty straightforward derivation of the integral of
cos2 t (happily, we get the same result as above):

if s = t then we have:

sin 2t = 2 sin t cos t

cos 2t = cos2 t - sin2 t
= cos2 t - 1 + cos2 t
= 2 cos2 t - 1

cos2 t = 1/2 (1 + cos 2t)

Substitute:

1 - sin2 t = 1/2(1 + cos 2t)
sin2 t = 1 - 1/2(1 + cos 2t)
= 1/2(1 - cos 2t)

We can integrate that easily:

∫sin2 t dt =
= ∫[ 1/2 - 1/2(cos 2t)] dt
= t/2 - 1/4(sin 2t)
= t/2 - 1/2(sin t cos t)
= 1/2(t - sin t cos t)

and

∫cos2 t dt =
= 1/2 ∫(1 + cos 2t) dt
= 1/2 (t + 1/2 sin 2t)
= 1/2 (t + sin t cos t)


But wait, we haven't solved the problem. We want to integrate:

dy = √(1 - x2)

substitute

x = sin θ
dx = cos θ dθ

then we have

y = ∫ √(1 - sin2 θ) cos θ dθ
y = ∫ cos θ cos θ dθ
y = ∫ cos2 θ dθ
= 1/2(θ + sin θ cos θ)

change back to x

y = 1/2 [ sin-1 x + x √(1-x2) ]

(Notice it's the inverse sine). Now, evaluate between x = 0 and x = 1:

y = 1/2[ π/2 + 0 - 0 - 0] = π / 4


I still haven't worked out the R2 part.

No comments: