Sponsored links: Algebra eBooks
 

Related

second-solve

hpf=second(solve(p=x-...

bpf=hpf*(1/s);

lpf=bpf*(1/s);

Calculate

second-solve

second(solve(p=x-k*p*...

Calculate

second-solve

l=second(solve(l=(((0...

l;

Calculate

second-solve

l=second(solve(l=(((0...

Calculate

second-solve

eq1: (Vin2-Vin)/R1 + ...

eq2: (Va-Vin2)/(1/(C1...

eq3: (Vb-Va)/(1/(C3*s...

Calculate

second-solve

u:1;

f(v,e):=second(solve(...

Calculate

second-solve

l=second(solve(l=(((0...

Calculate

second-solve

second(solve(x^2+y^2+...

Calculate

second-solve

l(v,e,u):=second(solv...

p=0.5*v/(l(v,e,u)*(v+...

Calculate

second-solve

eq1: (Vin2-Vin)/R1 + ...

eq2: (Va-Vin2)/(1/(C1...

eq3: (Vb-Va)/(1/(C3*s...

Calculate

second

Run Example
(%i1)intervals(items):=block([result],  result: if (emptyp(items)) then [] else           if(listp(items)) then          if(emptyp(rest(items))) then [] else          cons(cons(first(items),  [second(items)]),          intervals(rest(items))));
(%o1) intervals(items) := block([result], 
result : if emptyp(items) then [] else (if listp(items)
 then (if emptyp(rest(items)) then [] else cons(cons(first(items), 
[second(items)]), intervals(rest(items))))))
(%i2) intervals(makelist(n, n, 1, 10));
(%o2) [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]
(%i3) intervals(makelist(n, n, 1, 11));
(%o3) [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], 
                                                             [9, 10], [10, 11]]
(%i4) ans:errcatch(find_root(sin(x), x, 2, 3));

find_root: function has same sign at endpoints: f(2.0) = 0.90929742682568, 
                                                      f(3.0) = 0.14112000805987
(%o4)                                 []
(%i5) ans;
(%o5)                                 []
(%i6) seq(start,stop,stepping,[shift]) := block([                                            n, y:[],                                             shift: (if (not(emptyp(shift)))                                                         then float(first(shift))                                                            else (0.0))                                            ],            (n:floor((float(stop-start)/float(stepping)))),            (if (start <
 stop)            then            (y:flatten(append([y],                                         makelist(float(start+shift+(stepping*(i-start))),                                         i, start, n+start))))            else            (y:flatten(append([y],                                         makelist(-(float(stop-shift-(stepping*(i-stop)))),                                         i, -(n+stop), stop)))))            (if (n>
1.0)                then return(y)                else return([])));
(%o6) seq(start, stop, stepping, [shift]) := 
block([n, y : [], shift : if not emptyp(shift) then float(first(shift))
                      float(stop - start)
 else 0.0], n : floor(-------------------), 
                        float(stepping)
if start < stop then y : flatten(append([y], 
makelist(float(start + shift + stepping (i - start)), i, start, n + start)))
 else y : flatten(append([y], makelist(- float(stop - shift
 - stepping (i - stop)), i, - (n + stop), stop)))(if n > 1.0 then return(y)
 else return([])))
(%i7) intervals(seq(0,7,1));
(%o7) [[0.0, 1.0], [1.0, 2.0], [2.0, 3.0], [3.0, 4.0], [4.0, 5.0], [5.0, 6.0], 
                                                                    [6.0, 7.0]]
(%i8) ans:[];
(%o8)                                 []
(%i9) %pi;
(%o9)                                 %pi
(%i10) %pi, numer;
(%o10)                         3.141592653589793
(%i11) 2*3.14159/%pi;
                                    6.28318
(%o11)                              -------
                                      %pi
(%i12) block([ans:[]], errormsg:false, for i in intervals(seq(0, 7, 1)) do ans:(append(ans, errcatch(find_root(sin(x), x, first(i), second(i))))), errormsg:true, return(ans));
(%o12)            [0.0, 3.141592653589793, 6.283185307179586]
(%i13) 
Run Example
kill(all);
(%o0)                                done
(%i1) eq_out : i_oa - (in_neg - vout)/Rf = 0;
                                  in_neg - vout
(%o1)                      i_oa - ------------- = 0
                                       Rf
(%i2) eq_in_pos : (in_pos - 0)/Rg - (vin2 - in_pos)/R2 = 0;
                          in_pos   vin2 - in_pos
(%o2)                     ------ - ------------- = 0
                            Rg          R2
(%i3) eq_in_neg : -(vin1 - in_neg)/R1 + (in_neg - vout)/Rf = 0;
                       in_neg - vin1   in_neg - vout
(%o3)                  ------------- + ------------- = 0
                            R1              Rf
(%i4) eq_in : in_pos - in_neg = 0;
(%o4)                         in_pos - in_neg = 0
(%i5) a : second(first(solve([eq_out, eq_in_pos, eq_in_neg, eq_in], [vout, in_neg, in_pos, i_oa])[1]));
                  Rf (vin1 R2 - Rg vin2 + Rg vin1) - Rg vin2 R1
(%o5)           - ---------------------------------------------
                                  R1 R2 + Rg R1
(%i6) ratsimp(a, vin1);
                 vin1 (Rf R2 + Rf Rg) - Rg vin2 R1 - Rf Rg vin2
(%o6)          - ----------------------------------------------
                                 R1 R2 + Rg R1
(%i7) ratsimp(a, vin2);
               - Rf vin1 R2 + vin2 (Rg R1 + Rf Rg) - Rf Rg vin1
(%o7)          ------------------------------------------------
                                R1 R2 + Rg R1
(%i8) vout = -vin1*(Rf*(R2+Rg))/(R1*(R2+Rg));
                                        Rf vin1
(%o8)                          vout = - -------
                                          R1
(%i9) vout = vin2*(Rg*(R1+Rf))/(R1*(R2+Rg));
                                  Rg vin2 (R1 + Rf)
(%o9)                      vout = -----------------
                                    R1 (R2 + Rg)
(%i10) vout = -vin1*Rf/R1;
                                        Rf vin1
(%o10)                         vout = - -------
                                          R1
(%i11) vout = vin2*(Rg*(R1+Rf))/(R1*(R2+Rg));
                                  Rg vin2 (R1 + Rf)
(%o11)                     vout = -----------------
                                    R1 (R2 + Rg)
(%i12) Rf : 1;
(%o12)                                 1
(%i13) R1 : 0.25;
(%o13)                               0.25
(%i14) R2 : 0.1667;
(%o14)                              0.1667
(%i15) Vneg : -Rf/R1;
(%o15)                               - 4.0
(%i16) Vpos : (Rg*(R1+Rf))/(R1*(R2+Rg));
                                    5.0 Rg
(%o16)                            -----------
                                  Rg + 0.1667
(%i17) 
Run Example
sublist([[1,2],[3,3]], lambda([x], first(x)!=second(x)));
(%o1)                                 []
(%i2) 
[abs,append,block,emptyp,errcatch,errormsg,find_root,first,flatten,floor,if,listp,makelist,not,numer,rest,second,sin] [append,ascii,block,concat,copylist,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,concat,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,concat,delete,divsum,first,if,random,second,slength,substring] [append,ascii,block,concat,divsum,first,if,return,second,slength,substring] [append,ascii,block,concat,divsum,first,if,second,slength,substring] [append,ascii,block,copylist,delete,divsum,first,if,make_random_state,next_prime,print,sconcat,second,set_random_state,slength,substring,true] [append,ascii,block,copylist,delete,divsum,first,if,make_random_state,next_prime,print,sconcat,second,set_random_state,slength,substring] [append,ascii,block,delete,first,if,make_random_state,next_prime,sconcat,second,set_random_state,slength,substring,true] [append,ascii,concat,first,second] [append,block,buildq,emptyp,ev,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,buildq,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,ceiling,emptyp,ev,first,flatten,floor,if,length,makelist,not,second] [append,block,ceiling,emptyp,ev,first,flatten,if,length,makelist,not,second] [append,block,ceiling,emptyp,first,flatten,floor,if,length,makelist,not,second] [append,block,do,emptyp,errcatch,errormsg,false,find_root,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,errormsg,false,find_root,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,errormsg,find_root,first,flatten,floor,if,listp,makelist,not,numer,rest,second,sin] [append,block,emptyp,errcatch,errormsg,find_root,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,errormsg,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,find_root,first,flatten,floor,if,last,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,last,length,listp,makelist,not,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,print,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,emptyp,first,flatten,floor,kill,lambda,last,listp,makelist,map,not,rest,second] [append,concat,first,second] [append,do,first,lambda,second,sublist] [bftorat,block,cons,delete,do,emptyp,first,float2bf,fpprec,lambda,last,listp,map,maplist,mod,ratepsilon,ratprint,rest,return,second] [block,emptyp,errcatch,find_root,first,if,last,listp,makelist,rest,second,sin] [block,emptyp,first,if,listp,makelist,rest,second] [buildq,first,lambda,map,second] [cabs,first,float,kill,load,plot2d,second,solve] [combine,diff,display2d,false,first,plot2d,second,solve,third] [concat,first,second] [cos,diff,divide,ev,first,second,sin,sqrt,third,trigrat,trigreduce] [cos,diff,ev,first,second,sin,sqrt,third,trigrat,trigreduce] [denom,first,kill,num,ratsimp,second,solve] [diff,display2d,false,first,second,solve,third] [diff,exp,expand,first,second,solve] [diff,first,second,solve,third] [diff,first,second,solve] [first,kill,last,length,plot2d,rhs,second,solve,sum] [first,kill,ratsimp,second,solve] [first,load,matrix,second] [first,ratsimp,second,solve] [first,second,solve] [ifactors,is,lambda,length,second,sublist] [ratsimp,second,solve] [second,solve]

Related Help

Help for Second