Contributor
Posts: 31

# Differentiation

Hello all;

How can i find the nth derivative of an function?

for example:      dn/dxn (exp(-x)*x^3)      (for n=2)

SAS Super FREQ
Posts: 4,243

## Re: Differentiation

The NLPFDD function in SAS/IML software computes the finite difference approximation of first and second derivatives for vector-values function (or scalar-valued, as you have here).

SAS/IML(R) 13.1 User's Guide

Here's an example: Optimizing? Two hints for specifying derivatives - The DO Loop

Also, if you have a time series with evenly spaced time points, you can use the DIF function in SAS/IML software or in the DATA step. See

Contributor
Posts: 31

## Re: Differentiation

How i can find the 10th derivative ?

SAS Super FREQ
Posts: 4,243

## Re: Differentiation

Foryour function you can find the 10th derivative analytically by repeated application of the product and chain rule. Tenth derivatives do not often arise in numerical computations.

Contributor
Posts: 31

## Re: Differentiation

Is there any example for application of the product and chain rule?

SAS Super FREQ
Posts: 4,243

## Re: Differentiation

Have you taken calculus? These are just the names of the usual rules for differentiation. For example, see your calculus book or see Product rule - Wikipedia, the free encyclopedia and Chain rule - Wikipedia, the free encyclopedia

Contributor
Posts: 31

## Re: Differentiation

I mean how can i apply the product and chain rule in SAS???

SAS Super FREQ
Posts: 4,243

## Re: Differentiation

SAS does not have a procedure that outputs symbolic derivatives.  You will have to do it by hand or use a symbolic algebra package such as Mathematica, Maple, or Maxima.

Contributor
Posts: 31

## Re: Differentiation

Ok

thank you so much

Discussion stats
• 8 replies
• 584 views
• 0 likes
• 2 in conversation