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:

Substinpart Calculator

Substinpart

Function: substinpart (<x>, <expr>, <n_1>, ..., <n_k>) Similar to substpart, but substinpart works on the internal representation of <expr>.

load("solve_rec");
load("draw");
simpsum: true;
y_exp: rhs(solve_rec(y[i+1]=y[i]*(1-alpha) + x*alpha, y[i], y[1]=y[1]));
/* выражение для n-ого члена */y_n:   multthru(subst(i=N, y_exp));
y_sum: multthru(factor(sum(y_exp, i, 1, N)));
/* выражение для суммы как у Todos и FrauSoboleva */y_sum: substinpart(factor(piece), y_sum, [1, 2, 3, 4]);
/* выразить `alpha

Examples:

          (%i1) x . diff (f(x), x, 2);
                                        2
                                       d
          (%o1)                   x . (--- (f(x)))
                                         2
                                       dx
          (%i2) substinpart (d^2, %, 2);
                                            2
          (%o2)                        x . d
          (%i3) substinpart (f1, f[1](x + 1), 0);
          (%o3)                       f1(x + 1)

If the last argument to a part function is a list of indices then several subexpressions are picked out, each one corresponding to an index of the list. Thus

          (%i1) part (x + y + z, [1, 3]);
          (%o1)                         z + x

piece holds the value of the last expression selected when using the part functions. It is set during the execution of the function and thus may be referred to in the function itself as shown below. If partswitch is set to true then end is returned when a selected part of an expression doesnt exist, otherwise an error message is given.

          (%i1) expr: 27*y^3 + 54*x*y^2 + 36*x^2*y + y + 8*x^3 + x + 1;
                        3         2       2            3
          (%o1)     27 y  + 54 x y  + 36 x  y + y + 8 x  + x + 1
          (%i2) part (expr, 2, [1, 3]);
                                            2
          (%o2)                         54 y
          (%i3) sqrt (piece/54);
          (%o3)                        abs(y)
          (%i4) substpart (factor (piece), expr, [1, 2, 3, 5]);
                                         3
          (%o4)               (3 y + 2 x)  + y + x + 1
          (%i5) expr: 1/x + y/x - 1/z;
                                       1   y   1
          (%o5)                      - - + - + -
                                       z   x   x
          (%i6) substpart (xthru (piece), expr, [2, 3]);
                                      y + 1   1
          (%o6)                       ----- - -
                                        x     z

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

(%o1)                                true
(%i2) 

Substinpart Example

Related Examples

substinpart

? substinpart;

Calculate

substinpart

? substinpart;

Calculate