I knew that
$$\int \big( f(x)+f'(x) \big) e^x \text{d}x = e^x f(x) + c$$
For instance,
$$\int \big( \sin(2x)+2\cos(2x) \big) e^x \text{d}x = e^x \sin(2x) + c$$
Also,
$$\int \big( \sin(x)\cos(2x)+\cos(x)\cos(2x)-2\sin(x)\sin(2x) \big) e^x \text{d}x = e^x \sin(x)\cos(2x) + c$$.
Now the question is: say the derivative, which appears in the integrand, was multiples with some real parameter $a$, can we use algebraic manipulations together with the formula mentioned above to evaluate the integral? Or we must use other techniques like integrating by parts or otherwise?
EXAMPLE:
We know, using the above formula, that
$$\int \big( \sin(\tan(x)) + \cos(\tan(x))\sec^2(x) \big) e^x \text{d}x = e^x \sin(\tan(x)) + c$$
$$\int \big( \sin(\tan(x)) + \color{red}{2} \cos(\tan(x))\sec^2(x) \big) e^x \text{d}x = \dots \space ?$$
How can we, algebraically, manage the $\color{red}{2}$ that appears in the integrand?
Your help would be appreciated. THANKS!
Note that integrating by parts tells us
$$\int (f(x)+af'(x))e^x dx=(1-a)\int f(x)e^x dx+af(x)e^x,$$
which is a kind of weighted average between $f(x)e^x$ and its antiderivative. So for $a\neq 1$, if you cannot evaluate the antiderivative of $f(x)e^x$, you're out of luck.