Tag Archives: integration

Motivating a Change of Variables in $\int \log x / (x^2 + ax + b) dx$

We will consider the improper definite integral $latex {\int_0^\infty \frac{\log x}{x^2 + ax + b}dx}$ for $latex {a,b > 0}$ (to guarantee convergence). This can be done through in many ways, but the purpose of this brief note is to motivate a particular way of writing integrals to look for symmetries to exploit while evaluating them.

Before we begin, let us note something special about integrals of the form

$$ \int_0^\infty f(x) \frac{dx}{x}. \tag{1}$$
Under the change of variables $latex {x \mapsto \frac{1}{x}}$, we see that

$$ \int_0^\infty f(x) \frac{dx}{x} = \int_0^\infty f(1/x) \frac{dx}{x}. \tag{2}$$
And under the change of variables $latex {x \mapsto \alpha x}$, we see that

$$ \int_0^\infty f(x) \frac{dx}{x} = \int_0^\infty f(\alpha x) \frac{dx}{x}. \tag{3}$$
In other words, the integral is almost invariant under these changes of variables — only the integrand $latex {f(x)}$ is affected while the bounds of integration and the measure $latex {\frac{dx}{x}}$ remain unaffected.

In fact, the measure $latex {\frac{dx}{x}}$ is the Haar measure associated to the line $latex {\mathbb{R}_+}$, so this integral property is not random. When working with integrals over the positive real line, it can often be fortuitous to explicitly write the integral against $latex {\frac{dx}{x}}$ before attempting symmetry arguments.

Here, we rewrite our integral as

$$ \int_0^\infty \frac{\log x}{x + a + \frac{b}{x}} \frac{dx}{x}. \tag{4}$$
The denominator is clearly invariant under the map $latex {x \mapsto \frac{b}{x}}$, while $latex {\log x}$ becomes $latex {\log(\frac{b}{x}) = \log b – \log x}$. Along with the special property above, this means that

$$ \int_0^\infty \frac{\log x}{x^2 + ax + b}dx = \int_0^\infty \frac{\log b – \log x}{x^2 + ax + b} dx. \tag{5}$$
Adding our original integral to both sides, we see that

$$ \int_0^\infty \frac{\log x}{x^2 + ax + b} dx = \frac{\log b}{2} \int_0^\infty \frac{1}{x^2 + ax + b}dx. \tag{6}$$

This now becomes a totally routine integral, albeit not entirely pleasant, to evaluate. Generally, one can complete the square and then either perform an argument by partial fractions or an argument through trig substitution (alternately, always use partial fractions and allow some complex numbers; or use hyperbolic trig sub; etc.). Let $latex {c = b – \frac{a^2}{4}}$, which arises naturally when completing the square in the denominator. If $latex {c = 0}$, then the change of variables $latex {x \mapsto x – \frac{a}{2}}$ transforms our integral into

$$ \frac{\log b}{2} \int_{a/2}^\infty \frac{dx}{x^2} = \frac{\log b}{a}. \tag{7}$$

When $latex {c \neq 0}$, performing the change of variables $latex {x \mapsto \sqrt{\lvert c \rvert} x – \frac{a}{2}}$ transforms our integral into

$$ \frac{\log b}{2\sqrt{\lvert c \rvert}} \int_{\frac{a}{2\sqrt{\lvert c \rvert}}}^\infty \frac{dx}{x^2 + 1} = \frac{\log b}{2\sqrt{\lvert c \rvert}} \left(\frac{\pi}{2} – \arctan\left(\frac{a}{2\sqrt{\lvert c \rvert}}\right)\right) \tag{8}$$
when $latex {c > 0}$, or

$$ \frac{\log b}{2\sqrt{\lvert c \rvert}} \int_{\frac{a}{2\sqrt{\lvert c \rvert}}}^\infty \frac{dx}{x^2 – 1} = \frac{\log b}{4\sqrt{\lvert c \rvert}} \log\frac{a + 2\sqrt{\lvert c \rvert}}{a – 2\sqrt{\lvert c \rvert}} \tag{9}$$
when $latex {c < 0}$.

Posted in Mathematics | Tagged , | Leave a comment

One cute integral served two ways

Research kicks up, writing kicks back. So in this brief note, we examine a pair of methods to examine an integral. They’re both very clever, I think. We seek to understand $$ I := \int_0^{\pi/2}\frac{\sin(x)}{\sin(x) + \cos(x)} dx $$

We base our first idea on an innocuous-seeming integral identity.

For $latex {f(x)}$ integrable on $latex {[0,a]}$, we have $$ \int_0^a f(x) dx = \int_0^a f(a-x)dx. \tag{1}$$


Posted in Mathematics | Tagged , , | 2 Comments

Trigonometric and related substitutions in integrals


1. Introduction

In many ways, a first semester of calculus is a big ideas course. Students learn the basics of differentiation and integration, and some of the big-hitting theorems like the Fundamental Theorems of Calculus. Even in a big ideas course, students learn how to differentiate any reasonable combination of polynomials, trig, exponentials, and logarithms (elementary functions).

But integration skills are not pushed nearly as far. Do you ever wonder why? Even at the end of the first semester of calculus, there are many elementary functions that students cannot integrate. But the reason isn’t that there wasn’t enough time, but instead that integration is hard. And when I say hard, I mean often impossible. And when I say impossible, I don’t mean unsolved, but instead provably impossible (and when I say impossible, I mean that we can’t always integrate and get a nice function out, unlike our ability to differentiate any nice function and get a nice function back). An easy example is the sine integral $$ \int \frac{\sin x}{x} \mathrm d x, $$
which cannot be expressed in terms of elementary functions. In short, even though the derivative of an elementary function is always an elementary function, the antiderivative of elementary functions don’t need to be elementary.

Worse, even when antidifferentiation is possible, it might still be really hard. This is the first problem that a second semester in calculus might try to address, meaning that students learn a veritable bag of tricks of integration techniques. These might include $latex {u}$-substitution and integration by parts (which are like inverses of the chain rule and product rule, respectively), and then the relatively more complicated techniques like partial fraction decomposition and trig substitution.

In this note, we are going to take a closer look at problems related to trig substitution, and some related ideas. We will assume familiarity with $latex {u}$-substitution and integration by parts, and we might even use them here from time to time. This, after the fold.


Posted in Brown University, Expository, Math 170, Mathematics | Tagged , , , , , , | Leave a comment

Math 100: Week 4

This is a post for my math 100 calculus class of fall 2013. In this post, I give the 4th week’s recitation worksheet (no solutions yet – I’m still writing them up). More pertinently, we will also go over the most recent quiz and common mistakes. Trig substitution, it turns out, is not so easy.

Before we hop into the details, I’d like to encourage you all to avail of each other, your professor, your ta, and the MRC in preparation for the first midterm (next week!).

1. The quiz

There were two versions of the quiz this week, but they were very similar. Both asked about a particular trig substitution

$latex \displaystyle \int_3^6 \sqrt{36 – x^2} \mathrm{d} x $

And the other was

$latex \displaystyle \int_{2\sqrt 2}^4 \sqrt{16 – x^2} \mathrm{d}x. $

They are very similar, so I’m only going to go over one of them. I’ll go over the first one. We know we are to use trig substitution. I see two ways to proceed: either draw a reference triangle (which I recommend), or think through the Pythagorean trig identities until you find the one that works here (which I don’t recommend).

We see a $latex {\sqrt{36 – x^2}}$, and this is hard to deal with. Let’s draw a right triangle that has $latex {\sqrt{36 – x^2}}$ as a side. I’ve drawn one below. (Not fancy, but I need a better light).

In this picture, note that $latex {\sin \theta = \frac{x}{6}}$, or that $latex {x = 6 \sin \theta}$, and that $latex {\sqrt{36 – x^2} = 6 \cos \theta}$. If we substitute $latex {x = 6 \sin \theta}$ in our integral, this means that we can replace our $latex {\sqrt{36 – x^2}}$ with $latex {6 \cos \theta}$. But this is a substitution, so we need to think about $latex {\mathrm{d} x}$ too. Here, $latex {x = 6 \sin \theta}$ means that $latex {\mathrm{d}x = 6 \cos \theta}$.

Some people used the wrong trig substitution, meaning they used $latex {x = \tan \theta}$ or $latex {x = \sec \theta}$, and got stuck. It’s okay to get stuck, but if you notice that something isn’t working, it’s better to try something else than to stare at the paper for 10 minutes. Other people use $latex {x = 6 \cos \theta}$, which is perfectly doable and parallel to what I write below.

Another common error was people forgetting about the $latex {\mathrm{d}x}$ term entirely. But it’s important!.

Substituting these into our integral gives

$latex \displaystyle \int_{?}^{??} 36 \cos^2 (\theta) \mathrm{d}\theta, $

where I have included question marks for the limits because, as after most substitutions, they are different. You have a choice: you might go on and put everything back in terms of $latex {x}$ before you give your numerical answer; or you might find the new limits now.

It’s not correct to continue writing down the old limits. The variable has changed, and we really don’t want $latex {\theta}$ to go from $latex {3}$ to $latex {6}$.

If you were to find the new limits, then you need to consider: if $latex {x=3}$ and $latex {\frac{x}{6} = \sin \theta}$, then we want a $latex {\theta}$ such that $latex {\sin \theta = \frac{3}{6}= \frac{1}{2}}$, so we might use $latex {\theta = \pi/6}$. Similarly, when $latex {x = 6}$, we want $latex {\theta}$ such that $latex {\sin \theta = 1}$, like $latex {\theta = \pi/2}$. Note that these were two arcsine calculations, which we would have to do even if we waited until after we put everything back in terms of $latex {x}$ to evaluate.

Some people left their answers in terms of these arcsines. As far as mistakes go, this isn’t a very serious one. But this is the sort of simplification that is expected of you on exams, quizzes, and homeworks. In particular, if something can be written in a much simpler way through the unit circle, then you should do it if you have the time.

So we could rewrite our integral as

$latex \displaystyle \int_{\pi/6}^{\pi/2} 36 \cos^2 (\theta) \mathrm{d}\theta. $

How do we integrate $latex {\cos^2 \theta}$? We need to make use of the identity $latex {\cos^2 \theta = \dfrac{1 + \cos 2\theta}{2}}$. You should know this identity for this midterm. Now we have

$latex \displaystyle 36 \int_{\pi/6}^{\pi/2}\left(\frac{1}{2} + \frac{\cos 2 \theta}{2}\right) \mathrm{d}\theta = 18 \int_{\pi/6}^{\pi/2}\mathrm{d}\theta + 18 \int_{\pi/6}^{\pi/2}\cos 2\theta \mathrm{d}\theta. $

The first integral is extremely simple and yields $latex {6\pi}$ The second integral has antiderivative $latex {\dfrac{\sin 2 \theta}{2}}$ (Don’t forget the $latex {2}$ on bottom!), and we have to evaluate $latex {\big[9 \sin 2 \theta \big]_{\pi/6}^{\pi/2}}$, which gives $latex {-\dfrac{9 \sqrt 3}{2}}$. You should know the unit circle sufficiently well to evaluate this for your midterm.

And so the final answer is $latex {6 \pi – \dfrac{9 \sqrt 2}{2} \approx 11.0553}$. (You don’t need to be able to do that approximation).

Let’s go back a moment and suppose you didn’t re”{e}valuate the limits once you substituted in $latex {\theta}$. Then, following the same steps as above, you’d be left with

$latex \displaystyle 18 \int_{?}^{??}\mathrm{d}\theta + 18 \int_{?}^{??}\cos 2\theta \mathrm{d}\theta = \left[ 18 \theta \right]_?^{??} + \left[ 9 \sin 2 \theta \right]_?^{??}. $

Since $latex {\frac{x}{6} = \sin \theta}$, we know that $latex {\theta = \arcsin (x/6)}$. This is how we evaluate the left integral, and we are left with $latex {[18 \arcsin(x/6)]_3^6}$. This means we need to know the arcsine of $latex {1}$ and $latex {\frac 12}$. These are exactly the same two arcsine computations that I referenced above! Following them again, we get $latex {6\pi}$ as the answer.

We could do the same for the second part, since $latex {\sin ( 2 \arcsin (x/6))}$ when $latex {x = 3}$ is $latex {\sin (2 \arcsin \frac{1}{2} ) = \sin (2 \cdot \frac{\pi}{6} ) = \frac{\sqrt 3}{2}}$; and when $latex {x = 6}$ we get $latex {\sin (2 \arcsin 1) = \sin (2 \cdot \frac{\pi}{2}) = \sin (\pi) = 0}$.

Putting these together, we see that the answer is again $latex {6\pi – \frac{9\sqrt 3}{2}}$.

Or, throwing yet another option out there, we could do something else (a little bit wittier, maybe?). We have this $latex {\sin 2\theta}$ term to deal with. You might recall that $latex {\sin 2 \theta = 2 \sin \theta \cos \theta}$, the so-called double-angle identity.

Then $latex {9 \sin 2\theta = 18 \sin \theta \cos \theta}$. Going back to our reference triangle, we know that $latex {\cos \theta = \dfrac{\sqrt{36 – x^2}}{6}}$ and that $latex {\sin \theta = \dfrac{x}{6}}$. Putting these together,

$latex \displaystyle 9 \sin 2 \theta = \dfrac{ x\sqrt{36 – x^2} }{2}. $

When $latex {x=6}$, this is $latex {0}$. When $latex {x = 3}$, we have $latex {\dfrac{ 3\sqrt {27}}{2} = \dfrac{9\sqrt 3}{2}}$.

And fortunately, we get the same answer again at the end of the day. (phew).

2. The worksheet

Finally, here is the worksheet for the day. I’m working on their solutions, and I’ll have that up by late this evening (sorry for the delay).

Ending tidbits – when I was last a TA, I tried to see what were the good predictors of final grade. Some things weren’t very surprising – there is a large correlation between exam scores and final grade. Some things were a bit surprising – low homework scores correlated well with low final grade, but high homework scores didn’t really have a strong correlation with final grade at all; attendance also correlated weakly. But one thing that really stuck with me was the first midterm grade vs final grade in class: it was really strong. For a bit more on that, I refer you to my final post from my Math 90 posts.

Posted in Brown University, Math 100, Mathematics | Tagged , , , , , , , , , , , | Leave a comment