So I'm trying to plot my Green's function derivative using the following code:
n = 3;
G[x_, xx_] := -1/(2 n) If[x < xx, x^n xx^-n, xx^n x^-n];
DG[x_, xx_] := D[G[x, xx], x];
Plot[DG[x, 0.3], {x, 0, 1}]
While Plot[G] works, trying to plot its derivative gives me some weird errors:
What's wrong with my code?