Solving $\int(3x + 4)e^{-2x+1}\,dx$ $\int(3x + 4)e^{-2x+1}\,dx$
My approach by using partial integration:
$f(x) = 3x + 4$
$f'(x) = 3$
$g(x) = e^{-2x+1}$
$g'(x) = e^{-2x+1}$
$f(x)  g'(x) - \int f'(x)g(x)\,dx$
$(3x+4)e^{-2x+1} - \int 3  e^{-2x+1}\,dx $
$= (3x+4)e^{-2x+1} - 3\int  e^{-2x+1}\,dx $
$= (3x+4)e^{-2x+1} - 3  e^{-2x+1} $
But wolframalhpa shows me a different result. But I have no idea where I made a mistake.
 A: The integration by parts formula is
$$\int dx \: f(x) g'(x) = f(x) g(x) - \int dx \: f'(x) g(x)$$
You took a derivative where you should have found an antiderivative
Let $g'(x) = e^{-2 x+1}$.  Then $g(x) = -(1/2) e^{-2 x+1}$.
Now give it a go.
A: The way in which @Ron evaluated the integral is definitely what you should do to get the answer. But if you just do the integral and you don't have enough time, you can do as follows:

In fact you have $\mathbf{(+1)}(3x+4)\times\frac{\exp(-2x+1)}{-2}$ $\LARGE+$ $\mathbf{(-1)}\times 3\times\frac{\exp(-2x+1)}4$
A: Just split that up:
$$
\int (3 x + 4) e^{-2 x + 1} d x
  = 3 e \int x e^{-2 x} dx + 4 e \int e^{- 2 x} dx
$$
The first term succumbs to partial integration, the second one is simple.
Yes, you could look for clever tricks to apply on each specific instance (and many times a clever trick reduces the job immensely), but before trying that you need to learn general techniques. Break the integral up into simpler ones, take out constants.
Check out computer algebra systems, they can help telling you if your results are right. Just consider that they might give equivalent but different-looking formulas.
