I am trying to show that -e^-x(-2-pi+2e^xSin[x]) satisfies the differential equation y'[t]+y[t]==4Sin[t] by plugging it in.
I put
DSolve[y'[t] + y[t] == 4 Sin[t], y[t], t]
into Mathematica but am always getting the error DSolve: cannot be used as a function and the solution it gives is DSolve[aSin[t]==4Sin[t].e^-t C[1]+e^-t integral of e^k(aSin[K[1]] dk[1], t].
How do I fix this to make it output the correct differential equations like it does in the examples?