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

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

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