The derivative of the Heaviside function is the delta function, however, I found this problem difficult to understand why we get the following:
$f(t)=\theta(t)\sin(3t)$
$f'(t)=\theta(t)'\sin(3t)+\sin(3t)'\theta(t)=\delta(t)\sin(3t)+3\cos(3t)\theta(t)$
But then,
$f''(t)=\delta(t)'\sin(3t)+3\cos(3t)'\theta(t)=\delta(t)\sin(3t)-9\theta(t)\sin(3t)$
But the correct answer is in fact $f''(t)=3\delta(t)-9\theta(t)\sin(3t)$
What happened to the product rule here?
Thanks
UPDATE:
I made a mistake in my calculations, and I use it to show what I thought
$f''(t)=(\delta(t)\sin(3t))'+3(\cos(3t)\theta(t))'=\delta(t)'\sin(3t)+3\delta(t)\cos(3t)-9(\sin(3t)\theta(t))+3(\cos(3t)\delta(t))$
Assuming $\delta(t)f(t)=0$, we get $3\delta(t)\cos(3t)=0$:
$f''(t)=\delta(t)'\sin(3t)-9(\sin(3t)\theta(t))$
But then, this link shows that $\delta(t)'\sin(3t)=0$, so
$f''(t)=-9(\sin(3t)\theta(t))$
but this is still wrong.
Is there a method to identify the correct way to differentiate this, without all these complex integrals?
I don't know how rigorous is this answer but this might clarify the WA result.
First, you have this property $\delta(t)g(t)=\delta(t)g(0)$. So $$ f'(t) = \theta'(t)\sin(3t) + 3\cos(3t)\theta(t) = 3\cos(3t)\theta(t) $$ since $\theta'(t)\sin(3t)=\delta(t)\sin(3t)=\delta(t)\sin(0) = \delta(t)(0)=0$.
Now, $$ f''(t) = 3\theta'(t)-9\sin(3t) = 3\delta(t)-9\sin(3t) $$ as the result from WA.
Now, I believe this is consistent with what you obtained using the product rule (not chain rule), except from the last part of your result. The mistake you made is to assume that $\delta'(t)=\delta(t)$ which is not.
Assume we didn't simplify $\theta'(t)\sin(3t)=0$. Hence, $$ f'(t) = \delta(t)\sin(3t) + 3\cos(3t)\theta(t) $$ so that $$ f''(t) = \delta(t)'\sin(3t) + 3\delta(t)\cos(3t) + 3\delta(t)-9\sin(3t) $$ Now, use $3\delta(t)\cos(3t) = 3\delta(t)\cos(0) = 3\delta(t)$. But also, we know that the main property of $\delta'(t)$ is that $\delta'(t)g(t) =- \delta(t)g'(t)$. Hence, $$ \delta(t)'\sin(3t) = -3\delta(t)\cos(3t) =-3\delta(t)\cos(0) = -3\delta(t) $$ Thus, $$ f''(t) = -3\delta(t)+3\delta(t)+3\delta(t)-9\sin(3t) = 3\delta(t)-9\sin(3t) $$ similarly as obtained before.
Summary: use dirac delta properties $\delta(t)g(t)=\delta(t)g(0)$ and $\delta'(t)g(t) =- \delta(t)g'(t)$. The first one is a consequence of the delta being 0 everywhere except at $t=0$ and the second one is a consequence of integration by parts.
Hope this helps!