Find the distributional derivative of a piecewise continuous function $f(x)=x^2$, when $x <3$ and $f(x)=x^3,$ when $x\geq 3$. Find the distributional derivative of a piecewise continuous function $f(x)=x^2$, when $x <3$ and $f(x)=x^3,$ when $x\geq 3$.
I know that I want to set this up as $$f(\phi)=-\int_{-\infty}^\infty f(x)\phi'(x)=-\int_{-\infty}^3x^2\phi'(x)dx - \int_{3}^\infty x^3\phi'(x)dx.$$
Using integration by parts, I can express the integrals as $$\int_{-\infty}^3x^2\phi'(x)dx = x^2\phi(x)\bigg|_{-\infty}^3-2\int_{-\infty}^3x\phi(x)dx = 9\phi(3)-2\int_{3}^\infty x\phi(x)dx$$ $$\int_{3}^\infty x^3\phi'(x)dx = x^3\phi(x)\bigg|_{3}^\infty-3\int_{3}^\infty x^2\phi(x)dx=27\phi(3)-3\int_{3}^\infty x^2\phi(x)dx.$$
but I'm unsure how to proceed from here. There isn't an obvious way for me to evaluate the remaining integrals, or to reduce them into the form of something else known.
Any thoughts would be greatly appreciated.
Thanks in advance.
 A: You have made errors: $\left. x^2 \phi(x) \right|_{-\infty}^{3} = 9 \phi(3)$, not just $9$. Likewise for the $x^3\phi(x)$ part. And how did you go from $\int_{-\infty}^{3}$ to $\int_3^\infty$?
What you should get is
$$
\langle f', \phi \rangle 
= -\langle f, \phi' \rangle
= -\int_{-\infty}^3x^2\phi'(x)\,dx - \int_{3}^\infty x^3\phi'(x)\,dx
\\= -9\,\phi(3) + 27\,\phi(3) + \int_{-\infty}^3 2x\,\phi(x)\,dx + \int_3^\infty 3x^2\,\phi(x)\,dx
\\= \langle 18\,\delta(x-3),\phi(x)\rangle + \langle g(x), \phi(x) \rangle,
$$
where
$$
g(x) = \begin{cases}
2x & (x<3) \\
3x^2 & (x>3)
\end{cases}
$$
Thus,
$$
f'(x) = 18\,\delta(x-3) + g(x).
$$
A: You wrote $9$ for $9\phi (3)$ and $27$ for $-27\phi (3)$ So you get $-9\phi (3)+2 \begin {align} \int\limits_3^{\infty} x\phi(x)dx \end {align}+27\phi (3)$ $+3\begin {align} \int\limits_3^{\infty} x^{2}\phi (x)dx \end {align}$. Hence the derivative is $=18\delta_3+2x\chi_{(-\infty, 3)}+3x^{2}\chi_{(3,\
\infty)}$.
Notation: $\delta_3(\phi)=\phi(3)$ for any test function $\phi$.
