integral of (4/(x times the square root of (x^2-1)) + (1+x+x^3)/(1+x^2)dx

see answer in prior post

To solve the integral ∫(4/(x * √(x^2-1)) + (1+x+x^3)/(1+x^2)) dx, we can split it into two parts:

Part 1: ∫(4/(x * √(x^2-1))) dx

To solve this part, we can use a trigonometric substitution.

Let x = sec(theta), where theta is the angle between the positive x-axis and the line connecting the origin to the point (x, y) on the curve (x, y) = (sec(theta), sec(theta) * tan(theta)).

Differentiating both sides with respect to theta, we have dx = sec(theta) * tan(theta) d(theta).

Substituting these values into the integral, we get:

∫(4/(x * √(x^2-1))) dx = ∫(4/(sec(theta) * √(sec^2(theta)-1))) (sec(theta) * tan(theta)) d(theta)

Simplifying, we have:

= ∫(4/(sec(theta) * √(tan^2(theta)))) (sec(theta) * tan(theta)) d(theta)

= ∫(4/(sec(theta) * tan(theta))) sec(theta) * tan(theta) d(theta)

= ∫4 d(theta)

= 4θ + C1, where C1 is the constant of integration.

Part 2: ∫((1+x+x^3)/(1+x^2)) dx

This part can be solved separately.

We can rewrite the integrand as:

(1 + x + x^3)/(1 + x^2) = (1 + x^2 - x^2 + x + x^3)/(1 + x^2)

= (1 + x^2)/(1 + x^2) - (x^2 - x)/(1 + x^2) + (x^3)/(1 + x^2)

= 1 - (x^2 - x)/(1 + x^2) + (x^3)/(1 + x^2)

Using partial fractions, we can express this as:

= 1 - 1/(1 + x^2) + ((x - 1)/(1 + x^2)) + (x^3)/(1 + x^2)

Now we can integrate term by term:

∫(1) dx = x

∫(1/(1 + x^2)) dx = arctan(x)

∫((x - 1)/(1 + x^2)) dx = 0.5 * ln|1 + x^2|

∫((x^3)/(1 + x^2)) dx = 0.5 * (x^2 - ln|1 + x^2|) + C2, where C2 is the constant of integration.

Adding these individual integrals together, we get:

∫((1+x+x^3)/(1+x^2)) dx = x - arctan(x) + 0.5 * ln|1 + x^2| + 0.5 * (x^2 - ln|1 + x^2|) + C2

= 0.5 * (x^2 + 1) - 0.5 * arctan(x) + C2

Now, the solution to the original integral is the sum of Part 1 and Part 2:

∫(4/(x * √(x^2-1)) + (1+x+x^3)/(1+x^2)) dx = 4θ + 0.5 * (x^2 + 1) - 0.5 * arctan(x) + C,

where C = C1 + C2 is the constant of integration for the entire integral.