Use
DSolve with
DiracDelta source term to find Green's function:
Solve the inhomogeneous ODE through convolution with Green's function:
Compare with the direct result from
DSolve:
Model a uniform probability distribution:
Calculate the probability distribution for the sum of two uniformly distributed variables:
Plot the distributions for the sum:
Fundamental solution (Green's function) of the 1D wave equation:
Solution for a given source term:
Plot the solution:
Fundamental solution of the Klein-Gordon

operator:
Visualize the fundamental solution (it is nonvanishing only in the forward light cone):
A cusp-containing peakon solution of the Camassa-Holm equation:
Check the solution:
Plot the solution:
Differentiate and integrate a piecewise defined function in a lossless manner:
Differentiating and integrating recovers the original function:
Using
Piecewise does not recover the original function: