0
|
7500 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# CHALLENGE -- Defining an ORIGINAL second derivative function?

Posted 9 years ago
 I began with this definition of the derivative , which resulted in: Limit[ #, h -> 0] & /@ { (f[x + h, y] - f[x, y])/ h. But, I want to calculate the derivative at a point with the definition . One aim is to increase the accuracy of the calculation by using a set of set of $x$ $i$ (a numerical grid), where the spacing (the distance from one grid point to the next) is $?x$. For example, $?x$ = 0.001, a grid of 10,000 points ( $i$ = 1, . . . , 10000) would span a spatial range of 10 units in $x$. I'm thinking one of these forms would be ideal for $x$ $i$ ... xi = i?xxi = (i ? im) ?xxi = i?x ? xm,  but I'm not sure which is best. Ultimately, I want to take a function $f$ of two variables, for example f[x_, n_] := - Sum [Sin[j x] /j, {j, 1, n}],  at the grid points $x$ $i$, and run through the grid, applying the derivative at a point equation (involving two neighbors for each derivative point). Then, after having the first derivative on the entire grid, calculate the second derivative on the grid, involving two first-derivative neighbors. Finally, I want to see the beautiful results on a plot. I'm sure there will be a do loop, couple arrays, and ListPlot function involved. I'm just not sure how to do all this, as I've just started with Mathematica. We have any good solutions?
3 Replies
Sort By:
Posted 9 years ago
 UPDATE: I do not want to use the Derivative or D functions. 
Posted 9 years ago
 UPDATE: I do not want to use the Derivative or D functions.  You must not, you can use Cauchy's integral to differentiate, see Complex variable methods in Numerical Differentiation, you can use the ND implementation in the Mathematica package NumericalCalculus` ...
Posted 9 years ago
 You do know that Mathematica can compute derivatives:f'[x]=D[f[x],x] and f''[x]=D[f[x],{x,2}]