Statistical programming, matrix languages, and more

get the root of a complicated equation

Reply
Occasional Contributor
Posts: 5

get the root of a complicated equation

How to get the root of a complicated equation in IML? Is there any function or call function to do that?
Thanks alot!
SAS Super FREQ
Posts: 3,234

Re: get the root of a complicated equation

Depends if the function is one-variable or several variables. Also if polynomial or general nonlinear equation.
1) For one variable and polynomial, use POLYROOT. This finds real and complex roots.
2) For finding the real roots of general functions, see Example 9.2 of the SAS/IML doc:
http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#imlug_genstatexpls_s...

The Newton-Raphson method (2) will find one root for each initial condition, so if you are trying to find multiple roots, you might want to vary the initial condition.
Post a Question
Discussion Stats
  • 1 reply
  • 258 views
  • 0 likes
  • 2 in conversation