4

After working on an ODE I find I am needing to solve the integral

$$\int \frac{u}{b - au - u^2}\mathrm{d}u$$

Trig subs, banging heads against walls, and sobbing have not yielded a solution. Yet.

Could use a hand, thanks.

2 Answers2

2

You can write $b-au-u^2=\frac{a^2+4b}{4}-(u+\frac a2)^2$

There are thus three cases to consider

A. $a^2+4b=0$

Then your integral is

$$\int\frac{\mathrm{d}u}{b-au-u^2}=-\int\frac{\mathrm{d}u}{(u+\frac a2)^2}=\frac{1}{u+\frac a2}+C$$

B. $a^2+4b>0$

The trinomial $b-au-u^2$ has two real roots $\alpha,\beta$

$$\alpha=\frac{-a+\sqrt{a^2+4b}}{2}$$ $$\beta=\frac{-a-\sqrt{a^2+4b}}{2}$$

Partial fraction decomposition yields

$$\frac{1}{b-au-u^2}=\frac{1}{\beta-\alpha}\frac{1}{u-\alpha}-\frac{1}{\beta-\alpha}\frac{1}{u-\beta}$$

Hence

$$\int\frac{\mathrm{d}u}{b-au-u^2}=\frac{1}{\beta-\alpha}\int \left(\frac{1}{u-\alpha}-\frac{1}{u-\beta}\right)\,\mathrm{d}u=\frac{1}{\beta-\alpha}\ln \left|\frac{u-\alpha}{u-\beta}\right|+C$$

C. $a^2+4b<0$

The trinomial $b-au-u^2$ has two complex roots. Let's apply the change of variable $u=\lambda t$ with $\lambda=\frac12\sqrt{|a^2+4b|}$:

$$\int\frac{\mathrm{d}u}{b-au-u^2}=\int\frac{\mathrm{d}u}{\frac{a^2+4b}{4}-(u+\frac a2)^2}=\int \frac{\lambda\,\mathrm{d}t}{-\lambda^2-(\lambda t+\frac a2)^2}\\=-\frac1\lambda\int \frac{\mathrm{d}t}{1+(t+\frac a{2\lambda})^2}=-\frac1\lambda\mathrm{Arctan}\left(t+\frac{a}{2\lambda}\right)+C\\=-\frac{2}{\sqrt{|a^2+4b|}}\mathrm{Arctan}\left(\frac{2u+a}{\sqrt{|a^2+4b|}}\right)+C$$


There is another solution in the case $a^2+4b>0$

Let's apply the change of variable $u=\lambda t$ with $\lambda=\frac12\sqrt{a^2+4b}$:

$$\int\frac{\mathrm{d}u}{b-au-u^2}=\int\frac{\mathrm{d}u}{\frac{a^2+4b}{4}-(u+\frac a2)^2}=\int \frac{\lambda\,\mathrm{d}t}{\lambda^2-(\lambda t+\frac a2)^2}\\=\frac1\lambda\int \frac{\mathrm{d}t}{1-(t+\frac a{2\lambda})^2}=\frac1\lambda\mathrm{Argth}\left(t+\frac{a}{2\lambda}\right)+C\\=\frac{2}{\sqrt{a^2+4b}}\mathrm{Argth}\left(\frac{2u+a}{\sqrt{a^2+4b}}\right)+C$$

It's valid if $\left|\frac{2u+a}{\sqrt{a^2+4b}}\right|<1$. Outside of this interval, the integral is instead

$$\frac{2}{\sqrt{a^2+4b}}\mathrm{Argcoth}\left(\frac{2u+a}{\sqrt{a^2+4b}}\right)+C$$

Notice that $\mathrm{Argth} x=\frac12\ln\frac{1+x}{1-x}$, defined for $|x|<1$ whereas $\mathrm{Argcoth} x=\frac12\ln\frac{x+1}{x-1}$, defined for $|x|>1$. Their derivative is the same, $\frac{1}{1-x^2}$.

1

Another approach is to use partial fraction

$$ \frac{u}{b-au-u^2} = \frac{A}{u-\alpha}+\frac{B}{u-\beta} $$

where $\alpha, \beta$ are the roots of $ b-au-u^2 $. You need to determine $A$ and $B$. The answer will have the form

$$ I = A\ln(u-\alpha)+B\ln(u-\beta)+C. $$

Note: Here are the roots

$$ \alpha = -\frac{a}{2}+\frac{\sqrt {{a}^{2}+4\,b}}{2},\quad \beta = -\frac{a}{2}-\frac{\sqrt {{a}^{2}+4\,b}}{2} $$

  • 1
    Ugh. With all respect, as Andre pointed out, there are only roots for certain a and b values. Perhaps I can make a restriction upon a and b to do this to make a somewhat complete answer – Andres Salas Sep 01 '14 at 03:35
  • @AndresSalas: Still you can use partial fraction. – Mhenni Benghorbal Sep 01 '14 at 03:36
  • Hmmmm. Not all parabolic functions are reducible, right? – Andres Salas Sep 01 '14 at 03:39
  • @AndresSalas: Do you know how to solve $ax^2+bx+c$? By the way do not worry about the down vote. – Mhenni Benghorbal Sep 01 '14 at 03:40
  • Yes, hmmm. You're right if we allow complex numbers, which I suppose is alright. My only problem is that sometimes the roots are imaginary. Also I have been under the impression that some quadratic formulas aren't factorable, unless I am not properly informed – Andres Salas Sep 01 '14 at 03:44
  • I would say the same about the downvote on your answer (not mine btw) I appreciate the help in general, I just worried about reducibility. – Andres Salas Sep 01 '14 at 03:46
  • @AndresSalas: You have the formula for the quadratic equation so you can use it. – Mhenni Benghorbal Sep 01 '14 at 03:46
  • Duh! Root one is $Alpha$, root two is $Beta$. Great I will use the integral. – Andres Salas Sep 01 '14 at 03:47
  • 1
    This is perfectly acceptable, and in fact the first thing I thought of. A quadratic is always factorable. There's no reason to be hesitant to use complex numbers--you'll get the same answer in the end. +1. Not sure why this was downvoted. – MPW Sep 01 '14 at 03:48
  • It isn't pretty, but I have this: $$x^{2}+ax-b=\left(x+\left[\frac{a+\sqrt{a^2+4b}}{2}\right]\right)\left(x+\left[\frac{a-\sqrt{a^2+4b}}{2}\right]\right)$$ – graydad Sep 01 '14 at 03:48
  • @AndresSalas As long as you remember how to take the logarithm of complex numbers, you'll be alright. HOWEVER, if there are no real roots, you can also write the solution in terms of the arctangent. – Akiva Weinberger Sep 01 '14 at 03:51
  • Yes @MPW perhaps the only reason it got downvoted is my initial knee-jerk reaction (I've been told some quadratic equations aren't reducible, which is true for reals, not reals and complexes.) Agreed. Yes let's integrate away now. Pardon my brain fart, now to solve the problem – Andres Salas Sep 01 '14 at 03:52
  • @columbus8myhw, could you expand where to get the arctan from? It actually showed up on a few other solutions I read. – Andres Salas Sep 01 '14 at 03:53
  • 2
    @AndresSalas: To get $\arctan$ soulution you need to complete the square as I said in my comment. – Mhenni Benghorbal Sep 01 '14 at 03:55
  • @AndresSalas It comes from completing the square and from the fact that:$$\int\frac1{x^2+1}\ dx=\arctan x$$ – Akiva Weinberger Sep 01 '14 at 03:55
  • Excuse my slowness, this and another problem this fits into have sapped all my skills. If I have an integral of the form $$int\frac{-u}{(a/2+u)^2 +a^2/4+b}du$$ Where and what do I do there? Is $a/2+u=tan(theta)$ or some such thing? @columbus8myhw – Andres Salas Sep 01 '14 at 04:01
  • @MPW "There's no reason to be hesitant to use complex numbers" Well, yes, there is a reason. Unless the OP has followed a course explaining what a complex log is really, it's just nonsense. And my guess is he didn't, if he is learning integrals. However, it's easy to use the integral of $\frac{1}{1+x^2}$ instead if roots are complex. And there is also the case of a double root. – Jean-Claude Arbaut Sep 01 '14 at 04:06
  • @AndresSalas In that case (with a $u$ in the numerator, instead of a constant) we can use the fact that$$\int\frac x{x^2+1}\ dx=\frac12\ln(x^2+1)\color{Gray}{+C}$$In the general case, we can let $t$ be the denominator. (I.e. use a substitution) – Akiva Weinberger Sep 01 '14 at 04:06