# Integration by parts, trig substitution u or dv? [duplicate]

I have been attempting to solve an integration expression. The exression I am attempting to solve:

$$\int_0^1 {\frac{3x^3-x^2+2x-4}{\sqrt{x^2-3x+2}}}\mathrm{d}x.$$

I have approached the problem from a few different angles, but I'll only touch on the solution that seems promising.

It appears to be an integral of the product of two functions of x, so integration by parts is currently the most favorable approach (versus simple substitution/partial fractions).

$$\int {u\mathrm{d}v} = uv - \int {v\mathrm{d}u}$$

We only need now to define $u$ and $\mathrm{d}v$ appropriately. For now, I will ignore the polynomial in the numerator as this is a straight forward function to integrate or find the derivative.

Let's turn our attention to the second function of $x$ in this integrand, which will for now be considered to be $\mathrm{d}v$:

$$\mathrm{d}v = \frac{1}{\sqrt{x^2-3x+2}}\mathrm{d}x$$

Unfortunately, this is not a perfect square, but I do see were are able factor $(x-1)^2$ providing us with a classical trig substitution possibility.

$$\mathrm{d}v = \frac{1}{\sqrt{(x-1)^2-1}}\mathrm{d}x$$

If we substitute $(x-1) = \sec(w)$, then $\mathrm{d}x = \sec(w)\tan(w)\mathrm{d}w$ and our equation solves to:

$$\mathrm{d}v = \frac{1}{\sqrt{\sec^2 w-1}}\sec{(w)}\tan{(w)}\mathrm{d}w = \frac{1}{\sqrt{\tan^2{(w)}}}\sec{(w)}\tan{(w)}\mathrm{d}w$$

$$\mathrm{d}v = \sec{(w)} dw$$

which then gives

$$v = \ln{|\sec{(w)} + \tan{(w)}|}$$

This is where I can't seem to finish this off. I need to convert this back to a function of $x$, not $w$ otherwise I end up with a strange integral involving the polynomial derivitive, $du$ as a function of $x$ and then as a function of $w$.

I can obviously handle the $\sec$ function, but the $\tan$ I can not convert back to a simple function of $x$.

And unless there is a trig trick here, I don't see how this can be used in the remaining integral $\int{v\mathrm{d}u}$

Conversely, we could say that

$u = \cot{w}$ and $\mathrm{d}u = -\sec^2{(w)}\mathrm{d}w$

and again, I don't see how to use this in the remaining integral.

$$(x-1) = \sec{(w)}$$

$$\mathrm{d}x = \sec{(w)}\tan{(w)}\mathrm{d}w$$

thus

$$\mathrm{d}u = \frac{-(x-1)^2}{\sec{(w)}\tan{(w)}}\mathrm{d}x$$

I am not sure how to convert back to a single function of $x$. Maybe I'm spacing on a tangent identity that would help me.

Just to clarify, I've tried factoring out polynomials in the numerator such as $(x-1)$, $(x-2)$ which do factor, but not both of them, as well as $2x-3$ (perhaps making substitution possible) but to no avail. I haven't been able to simplify the problem more than this.

Any thoughts?

EDIT- I guess I made a mistake with my denominator factoring.

All thing considered, the integral seems to simplify to:

$\int_0^1 {\frac{3x^2+2x+4}{\sqrt{\frac{(x-2)}{(x-1)}}}}$

I will try a few things from this.

• I do not immediately see how integration by parts is working nicely on this integral. Why not complete the square inside the squareroot from the beginning, and set $x-1.5=\frac{sec\theta}{4}$ and go from there? At the end you essentially need this sub and some right triangle trigonometry (SOHCAHTOA) to get it back in terms of $x$ – imranfat Jun 14 '18 at 19:12
• Interesting approach. I'll give it a shot. I'm ten years out of school, so my calc skills are a bit rusty. I vaguely remember the "complete the square" section.... – Chemistpp Jun 14 '18 at 19:14
• Completing the square does not give you $\sqrt {(x-1)^2 + 1}$ – Doug M Jun 14 '18 at 19:16
• You made wrong completion of the square. – Юрій Ярош Jun 14 '18 at 19:20
• I am not sure but maybe the fact that $3x^3-x^2+2x-4$ divides $x-1$ and $x^2-3x+2=(x-1)(x-2)$ can help you. – Юрій Ярош Jun 14 '18 at 19:24

I'm going to start from the beginning and offer my own method

First, you'll want to simplify the integrand a bit. Long division gives

$$3x^2 - x^2 + 2x - 4 = (3x+8)(x^2-3x+2) + 20x - 20$$

Thus

$$\frac{3x^3-x^2+2x-4}{\sqrt{x^2-3x+2}} = (3x+8)\sqrt{x^2-3x+2} + \frac{20x-20}{\sqrt{x^2-3x+2}}$$

Next, complete the square root

$$x^2 - 3x + 2 = \left(x-\frac32\right)^2-\frac14$$

Substitute $u = x-\frac32$ to simplify get the integral

$$I = \int \left[\left(3u + \frac{25}{2}\right)\sqrt{u^2-\frac14} + \frac{20u+10}{\sqrt{u^2-\frac14}}\right]du$$

Break this down further into 4 separate terms

$$I= \underbrace{\int 3u\sqrt{u^2-\frac14}\ du}_{I_1} + \underbrace{\int\frac{25}{2}\sqrt{u^2-\frac14}\ du}_{I_2} + \underbrace{\int\frac{20u}{\sqrt{u^2-\frac14}}du}_{I_3} + \underbrace{\int\frac{10}{\sqrt{u^2-\frac14}}du}_{I_4}$$

For $I_1$ and $I_3$, simply substitute $s = u^2-\frac14$.

For $I_2$ and $I_4$, use either a trig subtitution $u = \dfrac{\sec t}{2}$, or a hyperbolic substitution $u = \dfrac{\cosh t}{2}$. I suggest the hyperbolic substitution, as it will give simpler integrals.

The integral, in $u$, should look something like this

$$I = \left(u^2-\frac14\right)^{3/2} + 20\sqrt{u^2-\frac14} + \frac{25}{4}u\sqrt{u^2-\frac14} + \frac{135}{16}\cosh^{-1}u + C$$