turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Differentiation

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-06-2014 09:08 AM

Hello all;

How can i find the nth derivative of an function?

for example: d^{n}/dx^{n} (exp(-x)*x^3) (for n=2)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RaniaMamdouh

05-06-2014 09:32 AM

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).

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

The DIF function: Compute lagged differences and finite differences - The DO Loop

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

05-06-2014 10:02 AM

How i can find the 10th derivative ?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RaniaMamdouh

05-06-2014 10:09 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

05-06-2014 10:19 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RaniaMamdouh

05-06-2014 10:38 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

05-06-2014 02:46 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RaniaMamdouh

05-06-2014 03:49 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

05-06-2014 04:31 PM

Ok

thank you so much