Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
-- Special operator: if Represents conditional evaluation. Various forms of if expressions are recognized.
if <cond_1> then <expr_1> else <expr_0> evaluates to <expr_1> if <cond_1> evaluates to true, otherwise the expression evaluates to <expr_0>.
![If Example f(x,y):= if (((x<0) and (y>0)) or ((x>0) and (y<0))) then ((abs(-(x*y)^2+(0.5*0.3)^2+(0.1*0.4)^2))^(1/2))/(sqrt(x^2+0.5^2+0.1^2)*sqrt(y^2+0.3^2+0.4^2)) else ( (x*y)^2+(0.5*0.3)^2+(0.1*0.4)^2 )^(1/2) / ( sqrt(x^2+0.5^2+0.1^2)* sqrt(y^2+0.3^2+0.4^2) );
plot3d(f(x,y), [x,-1,1], [y,-1,1]);](http://maxima-online.org//plot.html?g=p-711000760.png&t=img&db=r-1293863291)
if <cond_1> then <expr_1> elseif <cond_2> then <expr_2> elseif ... else <expr_0> evaluates to <expr_k> if <cond_k> is true and all preceding conditions are false. If none of the conditions are true, the expression evaluates to expr_0.
A trailing else false is assumed if else is missing. That is, if <cond_1> then <expr_1> is equivalent to if <cond_1> then <expr_1> else false, and if <cond_1> then <expr_1> elseif ... elseif <cond_n> then <expr_n> is equivalent to if <cond_1> then <expr_1> elseif ... elseif <cond_n> then <expr_n> else false.
The alternatives <expr_0>, ..., <expr_n> may be any Maxima expressions, including nested if expressions. The alternatives are neither simplified nor evaluated unless the corresponding condition is true.
The conditions <cond_1>, ..., <cond_n> are expressions which potentially or actually evaluate to true or false. When a condition does not actually evaluate to true or false, the behavior of if is governed by the global flag prederror. When prederror is true, it is an error if any evaluated condition does not evaluate to true or false. Otherwise, conditions which do not evaluate to true or false are accepted, and the result is a conditional expression.
Among other elements, conditions may comprise relational and logical operators as follows.
Operation Symbol Type
less than < relational infix less than <= or equal to relational infix equality (syntactic) = relational infix negation of = # relational infix equality (value) equal relational function negation of equal notequal relational function greater than >= or equal to relational infix greater than > relational infix and and logical infix or or logical infix not not logical prefix
There are also some inexact matches for if. Try ?? if to see them.
(%o1) true (%i2)
![plot2d([F(x), f(x)], [x, -1, 2], [y, -0.5, 2.5], [box, true], [legend, "F(x)", "f(x)"]);](http://maxima-online.org/plot.html?g=p-1014939464.png&t=img&db=r290442537)
/*dystrybuanta*/F(x):...
/*gestosc*/f(x):=if (...
integrate(2*x^2, x);