Sponsored links: Algebra eBooks
 

Related

symbolp

symbolp(k);

symbolp(k^2);

Calculate

symbolp

symbolp(k);

Calculate

symbolp

symbolp(k);

symbolp(k^2);

Calculate

symbolp

symbolp(k);

Calculate

symbolp

Run Example
(%i1)expr:1/(k^2+k);
                                      1
(%o1)                               ------
                                     2
                                    k  + k
(%i2) part(expr, 1);
(%o2)                                  1
(%i3) part(expr, 2);
                                     2
(%o3)                               k  + k
(%i4) part(expr, 2, 1);
                                       2
(%o4)                                 k
(%i5) part(expr, 2, 2);
(%o5)                                  k
(%i6) block([ans:[]], for i in expr do ans:append(ans, [i]),   return(ans));
                                       2
(%o6)                             [1, k  + k]
(%i7) block([ans:[]], for i in expr do ans:append(ans, [(if(symbolp(i)) then i else nil)]), return(ans));
(%o7)                             [nil, nil]
(%i8) listofvars(expr);
(%o8)                                 [k]
(%i9) 
Run Example
termp (e) := symbolp(e) or (numberp(e) and e >
 0)  or ((op(e) = "+" or op(e) = "*") and every (ptermp, args(e)));
(%o1) termp(e) := symbolp(e) or (numberp(e) and (e > 0))
               or (((op(e) = "+") or (op(e) = "*")) and every(ptermp, args(e)))
(%i2) matchdeclare (pterm, ptermp);
(%o2)                                done
(%i3) matchdeclare (otherterm, all);
(%o3)                                done
(%i4) defrule (r1, pterm + otherterm = 0, ratsimp (pterm/(-otherterm)) = 1);
                                                      pterm
(%o4)      r1 : pterm + otherterm = 0 -> (ratsimp(- ---------) = 1)
                                                    otherterm
(%i5) disprule(all);
                                                      pterm
(%t5)      r1 : pterm + otherterm = 0 -> (ratsimp(- ---------) = 1)
                                                    otherterm

(%o5)                                [%t5]
(%i6) apply1 ('(a*x - b - c + d = 0), r1);
(%o6)                         a x + d - c - b = 0
(%i7) apply1 (a*x - (b + g) - 2*c + d*e*f = 0, r1);
(%o7)                    a x - g + d e f - 2 c - b = 0
(%i8) 
Run Example
symbolp(k);
(%o1)                                true
(%i2) 

Related Help

Help for Symbolp