Use integration by parts to evaluate the integral of x*sec^2(3x).

My answer is
([x*tan(3x)]/3)-[ln(sec(3x))/9]
but it's incorrect.

u=x dv=sec^2(3x)dx
du=dx v=(1/3)tan(3x)

[xtan(3x)]/3 - integral of(1/3)tan(3x)dx
- (1/3)[ln(sec(3x))/3]
- [ln(sec(3x))/9]

What am I doing wrong?

integral of(1/3)tan(3x)dx

= (1/3)integral of(sin3x/cos 3x) dx
= (1/3)ln|sin 3x| + C

then the final answer is

(x tan3x)/3 - (1/3)ln|sin 3x| + C

To find the integral of x*sec^2(3x) using integration by parts, you correctly chose u=x and dv=sec^2(3x)dx. Then, you found du=dx and v=(1/3)tan(3x). However, there seems to be a mistake in evaluating the integral.

Let's go through the process of integration by parts again:

Start with the formula for integration by parts:

∫ u dv = uv - ∫ v du

Substituting the values of u, dv, du, and v:

∫ x * sec^2(3x) dx = (x * (1/3)tan(3x)) - ∫ (1/3)tan(3x) dx

Now, you need to integrate (1/3)tan(3x) dx. To do this, you can make a substitution. Let u = 3x, then du = 3 dx.

∫ (1/3)tan(3x) dx = (1/3)∫ tan(u) (du/3)
= (1/9)∫ tan(u) du

Now, integrate the expression (1/9)tan(u) using the integration rule for tan(x). The integral of tan(x) is -ln|cos(x)|, so:

= (1/9) * (-ln|cos(u)|) + C
= -(1/9)ln|cos(3x)| + C

Substituting this result back into the original equation:

∫ x * sec^2(3x) dx = (x * (1/3)tan(3x)) - (-(1/9)ln|cos(3x)|) + C
= (x/3)tan(3x) + (1/9)ln|cos(3x)| + C

So, the correct answer is:

∫ x * sec^2(3x) dx = (x/3)tan(3x) + (1/9)ln|cos(3x)| + C

It seems there was a sign error in your attempt, as well as some confusion with the constants. Make sure to carefully double-check your work and be mindful of the signs when performing the calculations.