Julia: use convolution to compute second derivative?

Viewed 117

I was trying to compute the second derivative of a function represented in a array. I am using

conv(u,[1,-2,1])[2:length(u) - 1]/dx

as a way of approximating the second derivative, but it is not accurate enough for my purpose. Does anyone know another method of taking the second derivatives?

Thanks

0 Answers
Related