If (e^x)(sin3x)=Im ((e^x)(e^i3x))

integrate (e^x)(sin3x)

I get the answer(e^x)(cos3x-3sin3x) +C

My book gets the answer
(1/10)(e^x)(sin3x-3cos3x)+C
Can any explain which answer is right and why

Integral of e^(1+3i)x =

e^(1+3i)x /(1+3i) + c

Multiplying numerator and denominator by (1-3i) gives:

(1-3i)e^(1+3i)x/10

If you take the imaginary part you get the answer given in your book.

I am such an idiot for some reason I differentiated not integrated. Thanks so much

No problem! We all make mistakes sometimes. It's great that you realized it and understood the correct approach. If you have any more questions, feel free to ask!

No problem at all! Differentiating and integrating are similar operations, but with opposite effects. When you differentiate a function, you find its derivative, which measures how the function is changing. On the other hand, when you integrate a function, you find its antiderivative, which tells you the original function from which it may have been derived. So, in this case, you were looking for the antiderivative of the function (e^x)(sin3x), not its derivative.

To clarify the right answer, let's integrate (e^x)(sin3x) step by step:

We can use integration by parts for this integral, using the formula:

∫u * v dx = u ∫v dx - ∫u' (∫v dx) dx

Taking u = e^x and dv = sin3x dx, we can calculate the derivatives:

u' = e^x
v = (-1/3)cos3x

Now, plugging these values into the formula:

∫(e^x)(sin3x) dx = (e^x) * (-1/3)cos3x - ∫(e^x) * (-1/3)(-3sin3x) dx
= (-1/3)(e^x)(cos3x) + ∫(e^x)(sin3x) dx

Notice that the integral of (e^x)(sin3x) appears on both sides of the equation. We can move it to the left side to solve for it:

∫(e^x)(sin3x) dx = (-1/3)(e^x)(cos3x) + ∫(e^x)(sin3x) dx

Now, we subtract ∫(e^x)(sin3x) dx from both sides of the equation:

0 = (-1/3)(e^x)(cos3x)

Since the right side equals zero, it means that the integral on the left side is equal to (∫(e^x)(sin3x) dx) + C, where C is the constant of integration.

Since the right side of the equation simplifies to zero, it means that C can be any constant value, as long as the derivative of that constant is zero.

Therefore, the correct answer is:

∫(e^x)(sin3x) dx = (-1/3)(e^x)(cos3x) + C

I hope this explanation helps clarify the solution for you!