Evaluate - Maple Help

OrthogonalSeries

 Evaluate
 evaluate a finite series

 Calling Sequence Evaluate(S, trunc_option) Evaluate(S, x=v, trunc_option) Evaluate(S, [x1=v1,..., xk=vk], trunc_option) Evaluate(S, v, trunc_option) Evaluate(S, [v1,..., vn], trunc_option)

Parameters

 S - orthogonal series x, x1, .., xk - name v, v1, .., vk - values (symbolic or numeric) trunc_option - (optional) equation of the form trunc=[t1,..., tn] or trunc=t1

Description

 • The Evaluate routine evaluates finite orthogonal series of one or more variables using a generalization of the Horner scheme.
 • The generalized Horner scheme accepts only finite series, that is, polynomials, but S can be a infinite series if the truncation option is used. This option has the form trunc=[t1,...,tn], where $n$ is the dimension of the series S and t1,...,tn are non-negative integers. The Evaluate(S, arguments, trunc=[t1,..., tn]) calling sequence is equivalent to Evaluate(Truncate(S, [t1,..., tn]), arguments). For $n$ equal to 1 the list format is not required. You can replace trunc=[t1] with trunc=t1.
 • The Evaluate(S) calling sequence returns the series S in the canonical basis.
 • The Evaluate(S, x=v) calling sequence evaluates the series S after substituting the value v for the variable x. More generally, the Evaluate(S, [x1=v1,..., xk=vk]) calling sequence evaluates the series S after substituting each value vi for the corresponding variable xi. If x or xi is not a variable of S, the substitution is ignored. If there exists i and j such that xi=xj in the substitution list, only the first substitution is performed. If the number of substitutions is less than the dimension of S, the result of the Evaluate function is a new orthogonal series with ($n-k$) variables. Otherwise, the result is an algebraic expression.
 • The Evaluate(S, v) calling sequence evaluates the univariate series S after substituting the value v for the variable. The Evaluate(S, [v1,..., vn]) calling sequence evaluates the series of dimension n S after substituting each vi for the corresponding ith variable. If n is not the dimension of S, an error is returned.

Examples

 > $\mathrm{with}\left(\mathrm{OrthogonalSeries}\right):$
 > $S≔\mathrm{Create}\left(\left[4,-2,\frac{1}{3}\right],\mathrm{ChebyshevT}\left(n,x\right)\right)$
 ${S}{≔}{4}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){-}{2}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){+}\frac{{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right)}{{3}}$ (1)
 > $\mathrm{Evaluate}\left(S\right);$$\mathrm{Evaluate}\left(S,1\right);$$\mathrm{Evaluate}\left(S,x=1\right)$
 $\frac{{2}}{{3}}{}{{x}}^{{2}}{-}{2}{}{x}{+}\frac{{11}}{{3}}$
 $\frac{{7}}{{3}}$
 $\frac{{7}}{{3}}$ (2)

If $y$ is not a variable of S, the substitution is ignored.

 > $\mathrm{Evaluate}\left(S,y=1\right)$
 ${4}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){-}{2}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){+}\frac{{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right)}{{3}}$ (3)

The following examples use the multivariate case.

 > $\mathrm{S1}≔\mathrm{Create}\left(\left[\left(1,2\right)=1,\left(4,3\right)=3\right],\mathrm{HermiteH}\left(n,x\right),\mathrm{HermiteH}\left(m,y\right)\right)$
 ${\mathrm{S1}}{≔}{\mathrm{HermiteH}}{}\left({1}{,}{x}\right){}{\mathrm{HermiteH}}{}\left({2}{,}{y}\right){+}{3}{}{\mathrm{HermiteH}}{}\left({4}{,}{x}\right){}{\mathrm{HermiteH}}{}\left({3}{,}{y}\right)$ (4)
 > $\mathrm{Evaluate}\left(\mathrm{S1}\right)$
 ${384}{}{{x}}^{{4}}{}{{y}}^{{3}}{-}{576}{}{{x}}^{{4}}{}{y}{-}{1152}{}{{x}}^{{2}}{}{{y}}^{{3}}{+}{1728}{}{{x}}^{{2}}{}{y}{+}{8}{}{x}{}{{y}}^{{2}}{+}{288}{}{{y}}^{{3}}{-}{4}{}{x}{-}{432}{}{y}$ (5)
 > $\mathrm{Evaluate}\left(\mathrm{S1},\left[3,4\right]\right)$
 ${1219764}$ (6)
 > $\mathrm{Evaluate}\left(\mathrm{S1},\left[x=3,y=4\right]\right)$
 ${1219764}$ (7)
 > $\mathrm{Evaluate}\left(\mathrm{S1},\left[x=3,y=4\right],\mathrm{trunc}=\left[2,2\right]\right)$
 ${372}$ (8)

If a variable is given multiple substitution values, the first is used.

 > $\mathrm{Evaluate}\left(\mathrm{S1},\left[y=3,y=4\right]\right)$
 ${34}{}{\mathrm{HermiteH}}{}\left({1}{,}{x}\right){+}{540}{}{\mathrm{HermiteH}}{}\left({4}{,}{x}\right)$ (9)
 > $\mathrm{Evaluate}\left(\mathrm{S1},\left[y=3\right]\right)$
 ${34}{}{\mathrm{HermiteH}}{}\left({1}{,}{x}\right){+}{540}{}{\mathrm{HermiteH}}{}\left({4}{,}{x}\right)$ (10)
 > $\mathrm{Evaluate}\left(\mathrm{S1},y=3,\mathrm{trunc}=2\right)$
 ${34}{}{\mathrm{HermiteH}}{}\left({1}{,}{x}\right)$ (11)

An infinite series can be partially evaluated if truncated.

 > $\mathrm{S2}≔\mathrm{Create}\left(\left\{\frac{1}{n},n=3..\mathrm{\infty },\left[4,-2,\frac{1}{3}\right]\right\},\mathrm{ChebyshevT}\left(n,x\right)\right)$
 ${\mathrm{S2}}{≔}{4}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){-}{2}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){+}\frac{{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right)}{{3}}{+}\left({\sum }_{{n}{=}{3}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{ChebyshevT}}{}\left({n}{,}{x}\right)}{{n}}\right)$ (12)
 > $\mathrm{Evaluate}\left(\mathrm{S2}\right)$
 > $\mathrm{Evaluate}\left(\mathrm{S2},\mathrm{trunc}=5\right)$
 $\frac{{16}}{{5}}{}{{x}}^{{5}}{+}{2}{}{{x}}^{{4}}{-}\frac{{8}}{{3}}{}{{x}}^{{3}}{-}\frac{{4}}{{3}}{}{{x}}^{{2}}{-}{2}{}{x}{+}\frac{{47}}{{12}}$ (13)