Answer: (a) \(2\mathrm{e}^{3x-1}(\sin x+2\cos x)\). (b) \(\frac13\tan3x+C\).
(a) First rewrite the expression without a quotient:
\(\dfrac{\sin x+\cos x}{\mathrm e^{1-3x}}=\mathrm e^{3x-1}(\sin x+\cos x).\)
Use the product rule. Let
\(u=\mathrm e^{3x-1},\qquad v=\sin x+\cos x.\)
Then
\(u'=3\mathrm e^{3x-1},\qquad v'=\cos x-\sin x.\)
So
\(\dfrac{\mathrm d}{\mathrm dx}\left[\mathrm e^{3x-1}(\sin x+\cos x)\right] =3\mathrm e^{3x-1}(\sin x+\cos x)+\mathrm e^{3x-1}(\cos x-\sin x).\)
Factorising \(\mathrm e^{3x-1}\),
\(\mathrm e^{3x-1}\left(3\sin x+3\cos x+\cos x-\sin x\right) =\mathrm e^{3x-1}(2\sin x+4\cos x).\)
Therefore
\(\dfrac{\mathrm d}{\mathrm dx}\left(\dfrac{\sin x+\cos x}{\mathrm e^{1-3x}}\right)=2\mathrm e^{3x-1}(\sin x+2\cos x).\)
(b) Use the identity
\(1+\tan^2u=\sec^2u.\)
With \(u=3x\),
\(\int(1+\tan^2 3x)\,\mathrm dx=\int\sec^2 3x\,\mathrm dx.\)
Since \(\dfrac{\mathrm d}{\mathrm dx}(\tan3x)=3\sec^23x\), the integral is
\(\dfrac13\tan3x+C.\)