Sponsored links: Algebra eBooks
 

Related

bothcoef-coeff-rhs

rhs(coeff(y-10*x-40=0));

bothcoef(y=10*x-40,x);

Calculate

bothcoef

bothcoef(3*v^2*w^3*x^...

Calculate

bothcoef-expand

bothcoef(expand( (B-2...

Calculate

bothcoef-coeff-rhs

rhs(coeff(y-10*x-40=0));

bothcoef(y=10*x-40,x);

Calculate

bothcoef-subst

expr: z^3 + a1*z*w + ...

bothcoef (subst (expr...

Calculate

bothcoef-expand-subst

expr: z^3 + a1*z*w + ...

bothcoef (expand(subs...

Calculate

bothcoef-expand-subst

expr: z^3 + a1*z*w + ...

bothcoef (expand(subs...

Calculate

bothcoef-expand-subst

expr: z^3 + a1*z*w + ...

expr : subst (expr,z,...

bothcoef (expand (exp...

Calculate

bothcoef-coeff-rhs

rhs(coeff(y-10*x-40=0));

bothcoef(y=10*x-40,x);

Calculate

bothcoef-expand

bothcoef(expand( (B-2...

Calculate

bothcoef

Run Example
(%i1)mod(8, 5);
(%o1)                                  3
(%i2) factor(x^2-4)/(x-2);
(%o2)                                x + 2
(%i3) islinear (expr, x) := block ([c],        c: bothcoef (rat (expr, x), x),        is (freeof (x, c) and c[1] # 0));
(%o3) islinear(expr, x) := block([c], c : bothcoef(rat(expr, x), x), 
                                                 is(freeof(x, c) and (c  # 0)))
                                                                       1
(%i4) islinear((x^2-6*x+8)/(x-2),x);
(%o4)                                true
(%i5) 
Run Example
? bothcoef;

 -- Function: bothcoef (<expr>, <x>)
     Returns a list whose first member is the coefficient of <x> in
     <expr> (as found by `ratcoef' if <expr> is in CRE form otherwise
     by `coeff') and whose second member is the remaining part of
     <expr>.  That is, `[A, B]' where `<expr> = A*<x> + B'.

     Example:

          (%i1) islinear (expr, x) := block ([c],
                  c: bothcoef (rat (expr, x), x),
                  is (freeof (x, c) and c[1] # 0))$
          (%i2) islinear ((r^2 - (x - r)^2)/x, x);
          (%o2)                         true


(%o1)                                true
(%i2) 
Run Example
mod(8, 5);
(%o1)                                  3
(%i2) factor(x^2-4);
(%o2)                           (x - 2) (x + 2)
(%i3) islinear (expr, x) := block ([c],        c: bothcoef (rat (expr, x), x),        is (freeof (x, c) and c[1] # 0));
(%o3) islinear(expr, x) := block([c], c : bothcoef(rat(expr, x), x), 
                                                 is(freeof(x, c) and (c  # 0)))
                                                                       1
(%i4) islinear((x^2-6*x+8)/(x-2),x);
(%o4)                                true
(%i5) 

Related Help

Help for Bothcoef