by equating the coefficients of sin x and cos x , or otherwise, find constants A and B satisfying the identity.

A(2sinx + cosx) + B(2cosx - sinx) = sinx + 8cosx

I got A = 2, B = 3, which the answers said were correct.

However, another part of the question asked

hence integrate

sinx + 8cosx
-------------dx
2sinx + cosx

and the answers were 2x + 3Ln (2sinx + cosx) + C

Could you explain how to get this?

Thanks in advance !!! :)

use what the first part showed. Using c for cos and s for sin, you showed that

s+8c = 2(2s+c) + 3(2c-s)

so,

(s+8c)/(2s+c)
= [2(2s+c) + 3(2c-s)]/(2s+c)
= 2 + 3(2c-s)/(2s+c)

now, you have ∫2 dx + ∫3du/u
integral is

2x + 3lnu
= 2x + 3ln(2s+c) + C

To find constants A and B in the given expression, A(2sinx + cosx) + B(2cosx - sinx) = sinx + 8cosx, you need to equate the coefficients of sinx and cosx on both sides of the equation.

On the left side, you have 2A for the coefficient of sinx and A - B for the coefficient of cosx. On the right side, you have 1 for the coefficient of sinx and 8 for the coefficient of cosx.

Equating the coefficients, you get two equations:

2A = 1 ---(1)
A - B = 8 ---(2)

From equation (1), you can solve for A by dividing both sides by 2:

A = 1/2

Substituting this value of A in equation (2), you can solve for B:

(1/2) - B = 8

- B = 8 - 1/2

- B = 15/2

B = -15/2

Therefore, A = 1/2 and B = -15/2.

Now, let's move on to integrating the expression sinx + 8cosx divided by 2sinx + cosx.

Integrating the numerator, sinx + 8cosx, requires simple integration rules:

∫ (sinx + 8cosx) dx = -cosx + 8sinx + C1 ----(3)
where C1 is the constant of integration.

Next, let's integrate the denominator, 2sinx + cosx, by using a substitution. Let u = 2sinx + cosx:

Differentiating both sides with respect to x:
du/dx = 2cosx - sinx

Rearranging the equation, we get:

dx = du / (2cosx - sinx)

Substituting this back into equation (3):

∫ (sinx + 8cosx) / (2sinx + cosx) dx = ∫ (-cosx + 8sinx) / (2cosx - sinx) du / (2cosx - sinx)

Simplifying the expression:

∫ (-cosx + 8sinx) du / (2cosx - sinx)

Now, we can see that -cosx + 8sinx matches the numerator of the expression we need to integrate. Therefore, we can rewrite the integral as:

∫ du

which is simply u + C2, where C2 is another constant of integration.

Substituting back the value of u = 2sinx + cosx:

u + C2 = 2sinx + cosx + C2

Finally, the integral of sinx + 8cosx / 2sinx + cosx is given by:

2x + 3Ln (2sinx + cosx) + C

where C is the constant of integration.