# [Maxima] displaying a function

Barton Willis willisb at unk.edu
Wed Jan 9 08:03:30 CST 2008

```You can do

(%i8) phi[0](x);
(%o8) x[1]*x[2]^2

(%i9) phi[42](x);
(%o9) 43*x[1]*x[2]^2

Is this enough?

Barton

-----maxima-bounces at math.utexas.edu wrote: -----

>To: maxima at math.utexas.edu
>From: Bart Vandewoestyne <Bart.Vandewoestyne at telenet.be>
>Sent by: maxima-bounces at math.utexas.edu
>Date: 01/09/2008 06:23AM
>Subject: [Maxima] displaying a function
>
>Dear list,
>
>Still taking my first steps with Maxima and definitely refusing
>to resort to Maple, I am setting up some simple examples before I
>try to implement the bigger thing that I am working on.  The
>purpose for me is to get a feel for and try to understand how
>Maxima works.
>
>Consider the following example where I have an s-dimensional
>function f(x) from which i create a new s-dimensional function
>f_periodized(x) by using a certain recursion:
>
>
>s: 2\$
>f(x) := product(x[i]^i, i, 1, s)\$
>
>phi[0](x) := f(x)\$
>for j:1 thru s do
>  phi[j](x) := phi[j-1](x) + f(x)\$
>
>dispfun(phi[s])\$
>
>f_periodized(x) := phi[s](x)\$
>dispfun(f_periodized)\$
>
>
>Starting from an arbitrary f(x), I would like to see how f_periodized(x)
>looks like.  For my given example, the dispfun(phi[s]) command gives me
>
>                                            s
>                                               2
>(%t6)                         phi (x) := 3 x  x
>                                 s          1  2
>
>
>Which is what I need.  However, the dispfun(f_periodized) command only
>gives
>
>(%t8)                     f_periodized(x) := phi (x)
>                                                s
>
>Why is this and how can i also display f_periodized(x) in terms of the
>x_i?
>
>Thanks,
>Bart
>
>--
>     "Share what you know.  Learn what you don't."
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
```