Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I know that in Mathematica one can define a function as follows:

f[x_]:=x^2.

The problem is, I get a polynomial from a for loop as an expression p=a*x^n+b*x^(n-1)+.... Now I want to evaluate the polynomial at a specific point. I tried to define a function from the polynomial as follows:

f[x_]:=p

and to evaluate

f[2]

which gives me just the polynomial, not it's value at 2.

How can I evaluate this?

Sincerely,

Nikola

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica Defining a function in Mathematica

Tags:

Loading...

Similar Threads for Defining function Mathematica |
---|

MATLAB Coding up the step function |

Bi-exponential function fitting in Origin Lab SW |

Mathematica Looping through vectorized functions for a piecewise solution |

Mathematica Cannot do the integral of the Hyper-geometric function? |

Mathematica Cannot Plot This Function in Mathematica |

**Physics Forums | Science Articles, Homework Help, Discussion**