Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Substpart Calculator

Substpart

Function: substpart (<x>, <expr>, <n_1>, ..., <n_k>) Substitutes <x> for the subexpression picked out by the rest of the arguments as in part. It returns the new value of <expr>. <x> may be some operator to be substituted for an operator of <expr>. In some cases <x> needs to be enclosed in double-quotes " (e.g. substpart ("+", a*b, 0) yields b + a).

sq:[[1,0],[2,0],[2,2],[1,2],[1,0]];
sq1:[[0,2,2,0,0],[0,0,2,2,0]];
rm:matrix([.707,-.707],[.707,.707]);
sqm:substpart(matrix, sq1, 0);
out:rm.sqm;
outL:args(out);
plot2d([discrete,sq1],[x,-3,3],[y,-3,3]);

          (%i1) 1/(x^2 + 2);
                                         1
          (%o1)                        ------
                                        2
                                       x  + 2
          (%i2) substpart (3/2, %, 2, 1, 2);
                                         1
          (%o2)                       --------
                                       3/2
                                      x    + 2
          (%i3) a*x + f(b, y);
          (%o3)                     a x + f(b, y)
          (%i4) substpart ("+", %, 1, 0);
          (%o4)                    x + f(b, y) + a

Also, setting the option inflag to true and calling part or substpart is the same as calling inpart or substinpart.

(%o1)                                true
(%i2) 

Substpart Example

Related Examples

substpart

a(x):=b*x+c;

a(x);

b:2;

Calculate

substpart

substpart ("[", 9/x, 0);

Calculate

substpart

? substpart;

Calculate

substpart

a: 1/(x^2 + 2);

substpart (x, a, 2);

Calculate

substpart

f1: 9/x;

f2: 4*%e^(3*x);

f3: 4*x^6;

Calculate

substpart

a: x*(x^2-x_0^2);

substpart (x_0, a, 2,...

Calculate

substpart

a(x):=b*x+c;

a(x);

d(b,x):=substpart("+"...

Calculate

substpart

substpart("(",a+b*(a+...

a+c+b*c+c*d+e+f+g+h+i...

["+",a,b];

Calculate

substpart

a(x):=b*x+c;

a(x);

b:2;

Calculate

substpart

a: 1/(x^2 + 2);

substpart (x, a, 2, 1...

Calculate