Origin for each line in Algebra.red from check-in 5f892713c3:

5f892713c3 2021-03-03    1: %%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03    2: %  ALGEBRA (SOLVE)
5f892713c3 2021-03-03    3: %%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03    4: 
5f892713c3 2021-03-03    5: % Specify blue for echoed input
5f892713c3 2021-03-03    6: color("Blue");
5f892713c3 2021-03-03    7: 
5f892713c3 2021-03-03    8: % Turn on fancy output
5f892713c3 2021-03-03    9: fancy_output;
5f892713c3 2021-03-03   10: 
5f892713c3 2021-03-03   11: % Turn input echo on
5f892713c3 2021-03-03   12: on echo;
5f892713c3 2021-03-03   13: 
5f892713c3 2021-03-03   14: % Solve quadratic equation
5f892713c3 2021-03-03   15: solve(x^2+8x+15=0, x);
5f892713c3 2021-03-03   16: 
5f892713c3 2021-03-03   17: % Solve for expression
5f892713c3 2021-03-03   18: solve(a*log(sin(x+3))^2 - b, sin(x+3));
5f892713c3 2021-03-03   19: 
5f892713c3 2021-03-03   20: % Solve simultaneous equations
5f892713c3 2021-03-03   21: solve({x+3y=7, y-x=1},{x,y});
5f892713c3 2021-03-03   22: 
5f892713c3 2021-03-03   23: % Solve a system with parameters
5f892713c3 2021-03-03   24: solve({x=a*z+1, y=b*z},{z,x});
5f892713c3 2021-03-03   25: 
5f892713c3 2021-03-03   26: % Simplify expression
5f892713c3 2021-03-03   27: ((((-r1*(1+k1))/(r2*(1+k2)))+((r1)/(r2)))/(((r1)/(r2))));
5f892713c3 2021-03-03   28: 
5f892713c3 2021-03-03   29: % Another solve example
5f892713c3 2021-03-03   30: % Note the use of $ as the line termination 
5f892713c3 2021-03-03   31: % character to suppress output from
5f892713c3 2021-03-03   32: % intermediate computations
5f892713c3 2021-03-03   33: x1 := sqrt(h^2 + p1^2)$
5f892713c3 2021-03-03   34: x2 := sqrt((h/2)^2 + (p-p1)^2)$
5f892713c3 2021-03-03   35: x3 := x1 + x2$
5f892713c3 2021-03-03   36: dx := df(x3, p1)$
5f892713c3 2021-03-03   37: solve(dx, p1);
5f892713c3 2021-03-03   38: 
5f892713c3 2021-03-03   39: % Suppose you are given the equation
5f892713c3 2021-03-03   40: % x^2+x+1=0 and wish to determine the
5f892713c3 2021-03-03   41: % value of x^3.  The following simple
5f892713c3 2021-03-03   42: % substitution achieves this.
5f892713c3 2021-03-03   43: rule := solve(x^2+x+1=0,x)$
5f892713c3 2021-03-03   44: y := (x^3 where rule);
5f892713c3 2021-03-03   45: 
5f892713c3 2021-03-03   46: % Then y=1, because
5f892713c3 2021-03-03   47: % x^3=x*(x^2)=-x*(x+1)=-x^2-x=1.
5f892713c3 2021-03-03   48: 
5f892713c3 2021-03-03   49: % Turn off echo
5f892713c3 2021-03-03   50: off echo;

iCAS Bundled REDUCE Scripts
Homepage | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]