Evaluate ∫eˣ(sin x + cos x) dx — Special eˣ Integral

medium CBSE JEE-MAIN JEE Main 2024 Shift 2 3 min read

Question

Evaluate:

ex(sinx+cosx)dx\int e^x(\sin x + \cos x)\, dx

This appeared in JEE Main 2024 Shift 2 and is a classic one-step problem — if you know the formula.


Solution — Step by Step

The integrand is ex(sinx+cosx)e^x(\sin x + \cos x). We need to check whether this fits the form ex[f(x)+f(x)]e^x[f(x) + f'(x)].

Ask yourself: is cosx\cos x the derivative of sinx\sin x? Yes. So let f(x)=sinxf(x) = \sin x, which gives f(x)=cosxf'(x) = \cos x.

The formula states:

ex[f(x)+f(x)]dx=exf(x)+C\int e^x[f(x) + f'(x)]\, dx = e^x f(x) + C

This is a direct result — no substitution, no integration by parts needed.

Since f(x)=sinxf(x) = \sin x:

ex(sinx+cosx)dx=exsinx+C\int e^x(\sin x + \cos x)\, dx = e^x \sin x + C

Final Answer: exsinx+Ce^x \sin x + C


Why This Works

The formula ex[f(x)+f(x)]dx=exf(x)+C\int e^x[f(x) + f'(x)]\, dx = e^x f(x) + C comes from reversing the product rule. When we differentiate exf(x)e^x f(x), we get exf(x)+exf(x)=ex[f(x)+f(x)]e^x f'(x) + e^x f(x) = e^x[f(x) + f'(x)]. So integration just undoes that.

This is why the formula requires exactly f(x)f(x) and its derivative f(x)f'(x) paired together. The exe^x acts as a multiplier throughout — it never changes form under differentiation, which is what makes this trick possible.

In board and JEE exams, this formula covers a whole family of questions. Any time you spot exe^x multiplied by two functions where one is the derivative of the other, you can write the answer in one step.


Alternative Method

We can verify using integration by parts twice — but honestly, this is the hard way. Use it only to build intuition or verify.

Let I=exsinxdx+excosxdxI = \int e^x \sin x\, dx + \int e^x \cos x\, dx.

Integrate excosxdx\int e^x \cos x\, dx by parts:

excosxdx=excosx+exsinxdx\int e^x \cos x\, dx = e^x \cos x + \int e^x \sin x\, dx

Substituting back:

I=exsinxdx+excosx+exsinxdxI = \int e^x \sin x\, dx + e^x \cos x + \int e^x \sin x\, dx

Now integrate exsinxdx\int e^x \sin x\, dx by parts:

exsinxdx=exsinxexcosxdx\int e^x \sin x\, dx = e^x \sin x - \int e^x \cos x\, dx

Substitute this in and the excosxdx\int e^x \cos x\, dx terms cancel cleanly, leaving I=exsinx+CI = e^x \sin x + C.

In exams, never use this two-step parts approach unless the question explicitly asks you to verify. The formula method is 10 seconds; the parts method is 3 minutes with a real risk of sign errors.


Common Mistake

Students often write ex(sinx+cosx)dx=ex(sinx+cosx)+C\int e^x(\sin x + \cos x)\, dx = e^x(\sin x + \cos x) + C — thinking the whole bracket multiplies exe^x in the answer. This confuses the integrand pattern with the result pattern. The formula gives exf(x)e^x f(x), not ex[f(x)+f(x)]e^x[f(x) + f'(x)]. Only f(x)=sinxf(x) = \sin x appears in the answer, not cosx\cos x.

A quick self-check: differentiate your answer exsinx+Ce^x \sin x + C. You should get back exsinx+excosx=ex(sinx+cosx)e^x \sin x + e^x \cos x = e^x(\sin x + \cos x). If it matches the original integrand, you’re correct.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next