123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833 |
- REDUCE 3.6, 15-Jul-95, patched to 6 Mar 96 ...
- % Tests of limits package.
- limit(sin(x)/x,x,0);
- 1
- % 1
- limit(sin(x)^2/x,x,0);
- 0
- % 0
- limit(sin(x)/x,x,1);
- sin(1)
- % sin(1)
- limit(1/x,x,0);
- infinity
- % infinity
- limit(-1/x,x,0);
- - infinity
- % - infinity
- limit((sin(x)-x)/x^3,x,0);
- - 1
- ------
- 6
- % -1/6
- limit(x*sin(1/x),x,infinity);
- 1
- % 1
- limit(sin x/x^2,x,0);
- infinity
- % infinity
- limit(x^2*sin(1/x),x,infinity);
- infinity
- % infinity
- % Simple examples from Schaum's Theory & Problems of Advanced Calculus
- limit(x^2-6x+4,x,2);
- -4
- % -4
- limit((x+3)*(2x-1)/(x^2+3x-2),x,-1);
- 3
- ---
- 2
- % 3/2
- limit((sqrt(4+h)-2)/h,h,0);
- 1
- ---
- 4
- % 1/4
- limit((sqrt(x)-2)/(4-x),x,4);
- - 1
- ------
- 4
- % -1/4
- limit((x^2-4)/(x-2),x,2);
- 4
- % 4
- limit(1/(2x-5),x,-1);
- - 1
- ------
- 7
- % -1/7
- limit(sqrt(x)/(x+1),x,1);
- 1
- ---
- 2
- % 1/2
- limit((2x+5)/(3x-2),x,infinity);
- 2
- ---
- 3
- % 2/3
- limit((1/(x+3)-2/(3x+5))/(x-1),x,1);
- 1
- ----
- 32
- % 1/32
- limit(sin(3x)/x,x,0);
- 3
- % 3
- limit((1-cos(x))/x^2,x,0);
- 1
- ---
- 2
- % 1/2
- limit((6x-sin(2x))/(2x+3*sin(4x)),x,0);
- 2
- ---
- 7
- % 2/7
- limit((1-2*cos(x)+cos(2x))/x^2,x,0);
- -1
- % -1
- limit((3*sin(pi*x) - sin(3*pi*x))/x^3,x,0);
- 3
- 4*pi
- % 4*pi^3
- limit((cos(a*x)-cos(b*x))/x^2,x,0);
- 2 2
- - a + b
- ------------
- 2
- % (-a^2 + b^2)/2
- limit((e^x-1)/x,x,0);
- 1
- % 1
- limit((a^x-b^x)/x,x,0);
- log(a) - log(b)
- % log(a) - log(b)
- % Examples taken from Hyslop's Real Variable
- limit(sinh(2x)^2/log(1+x^2),x,0);
- 4
- % 4
- limit(x^2*(e^(1/x)-1)*(log(x+2)-log(x)),x,infinity);
- 2
- % 2
- limit(x^alpha*log(x+1)^2/log(x),x,infinity);
- 2
- alpha log(x + 1)
- limit(x *-------------,x,infinity)
- log(x)
- %% if repart alpha < 0 then 0 else infinity.
- %% fails because answer depends in essential way on parameter.
- limit((2*cosh(x)-2-x^2)/log(1+x^2)^2,x,0);
- 1
- ----
- 12
- % 1/12
- limit((x*sinh(x)-2+2*cosh(x))/(x^4+2*x^2),x,0);
- 1
- % 1
- limit((2*sinh(x)-tanh(x))/(e^x-1),x,0);
- 1
- % 1
- limit(x*tanh(x)/(sqrt(1-x^2)-1),x,0);
- -2
- % -2
- limit((2*log(1+x)+x^2-2*x)/x^3,x,0);
- 2
- ---
- 3
- % 2/3
- limit((e^(5*x)-2*x)^(1/x),x,0);
- 3
- e
- % e^3
- limit(log(log(x))/log(x)^2,x,infinity);
- 0
- % 0
- % These are adapted from Lession 4 from Stoutmyer
- limit((e^x-1)/x, x, 0);
- 1
- % 1
- limit(((1-x)/log(x))**2, x, 1);
- 1
- % 1
- limit(x/(e**x-1), x, 0);
- 1
- % 1
- %% One sided limits
- limit!+(sin(x)/sqrt(x),x,0);
- 0
- % 0
- limit!-(sin(x)/sqrt(x),x,0);
- 0
- % 0
- limit(x/log x,x,0);
- 0
- % 0
- limit(log(1 + x)/log x,x,infinity);
- 1
- % 1
- limit(log x/sqrt x,x,infinity);
- 0
- % 0
- limit!+(sqrt x/sin x,x,0);
- infinity
- % infinity
- limit(log x,x,0);
- - infinity
- % - infinity
- limit(x*log x,x,0);
- 0
- % 0
- limit(log x/log(2x),x,0);
- 1
- % 1
- limit(log x*log(1+x)*(1+x),x,0);
- 0
- % 0
- limit(log x/x,x,infinity);
- 0
- % 0
- limit(log x/sqrt x,x,infinity);
- 0
- % 0
- limit(log x,x,infinity);
- infinity
- % infinity
- limit(log(x+1)/sin x,x,0);
- 1
- % 1
- limit(log(1+1/x)*sin x,x,0);
- 0
- % 0
- limit(-log(1+x)*(x+2)/sin x,x,0);
- -2
- % -2
- limit(-log x*(3+x)/log(2x),x,0);
- -3
- % -3
- limit(log(x+1)^2/sqrt x,x,infinity);
- 0
- % 0
- limit(log(x + 1) - log x,x,infinity);
- 0
- % 0
- limit(-(log x)^2/log log x,x,infinity);
- - infinity
- % - infinity
- limit(log(x-1)/sin x,x,0);
- sign(log(-1))*infinity
- % infinity
- limit!-(sqrt x/sin x,x,0);
- - sign(i)*infinity
- % infinity
- limit(log x-log(2x),x,0);
- - log(2)
- % - log(2)
- limit(sqrt x-sqrt(x+1),x,infinity);
- 0
- % 0
- limit(sin sin x/x,x,0);
- 1
- % 1
- limit!-(sin x/cos x,x,pi/2);
- infinity
- % infinity % this works!
- limit!+(sin x/cos x,x,pi/2);
- - infinity
- % - infinity % so does this!
- limit(sin x/cosh x,x,infinity);
- 0
- % 0
- limit(sin x/x,x,infinity);
- 0
- % 0
- limit(x*sin(1/x),x,0);
- 0
- % 0
- limit(exp x/((exp x + exp(-x))/2),x,infinity);
- 2
- % 2
- % limit(exp x/cosh x,x,infinity); % fails in this form, but if cosh is
- %defined using let, then it works.
- limit((sin(x^2)/(x*sinh x)),x,0);
- 1
- % 1
- limit(log x*sin(x^2)/(x*sinh x),x,0);
- - infinity
- % - infinity
- limit(sin(x^2)/(x*sinh x*log x),x,0);
- 0
- % 0
- limit(log x/log(x^2),x,0);
- 1
- ---
- 2
- % 1/2
- limit(log(x^2)-log(x^2+8x),x,0);
- - infinity
- % - infinity
- limit(log(x^2)-log(x^2+8x),x,infinity);
- 0
- % 0
- limit(sqrt(x+5)-sqrt x,x,infinity);
- 0
- % 0
- limit(2^(log x),x,0);
- 0
- % 0
- % Additional examples
- limit((sin tan x-tan sin x)/(asin atan x-atan asin x),x,0);
- 1
- % 1
- % This one has the value infinity, but fails with de L'Hospital's rule:
- limit((e+1)^(x^2)/e^x,x,infinity);
- 2
- x
- (e + 1)
- limit(-----------,x,infinity)
- x
- e
- % infinity % fails
- comment
- The following examples were not in the previous set$
- % Simon test examples:
- limit(log(x-a)/((a-b)*(a-c)) + log(2(x-b))/((b-c)*(b-a))
- + log(x-c)/((c-a)*(c-b)),x,infinity);
- 1
- log(---)
- 2
- ----------------------
- 2
- a*b - a*c - b + b*c
- % log(1/2)/((a-b)*(b-c))
- limit(1/(e^x-e^(x-1/x^2)),x,infinity);
- 1
- limit(----------------,x,infinity)
- 2
- x x - 1/x
- e - e
- % infinity % fails
- % new capabilities: branch points at the origin, needed for definite
- % integration.
- limit(x+sqrt x,x,0);
- 0
- % 0
- limit!+(sqrt x/(x+1),x,0);
- 0
- % 0
- limit!+(x^(1/3)/(x+1),x,0);
- 0
- % 0
- limit(log(x)^2/x^(1/3),x,0);
- infinity
- % infinity
- limit(log x/x^(1/3),x,0);
- - infinity
- % - infinity
- h := (X^(1/3) + 3*X**(1/4))/(7*(SQRT(X + 9) - 3)**(1/4));
- 1/4 1/3
- 3*x + x
- h := ------------------------
- 1/4
- 7*(sqrt(x + 9) - 3)
- limit(h,x,0);
- 1/4
- 3*6
- --------
- 7
- % 3/7*6^(1/4)
- % Examples from Paul S. Wang's thesis:
- limit(x^log(1/x),x,infinity);
- 0
- % 0
- limit(cos x - 1/(e^x^2 - 1),x,0);
- - infinity
- % - infinity
- limit((1+a*x)^(1/x),x,infinity);
- 1
- % 1
- limit(x^2*sqrt(4*x^4+5)-2*x^4,x,infinity);
- 5
- ---
- 4
- % 5/4
- limit!+(1/x-1/sin x,x,0);
- 0
- % 0
- limit(e^(x*sqrt(x^2+1))-e^(x^2),x,infinity);
- 2 2
- x*sqrt(x + 1) x
- limit(e - e ,x,infinity)
- % 0 fails
- limit((e^x+x*log x)/(log(x^4+x+1)+e^sqrt(x^3+1)),x,infinity);
- x
- e + x*log(x)
- limit(---------------------------------,x,infinity)
- 3
- 4 sqrt(x + 1)
- log(x + x + 1) + e
- %0 % fails
- limit!-(1/(x^3-6*x+11*x-6),x,2);
- 1
- ----
- 12
- % 1/12
- limit((x*sqrt(x+5))/(sqrt(4*x^3+1)+x),x,infinity);
- 1
- ---
- 2
- % 1/2
- limit!-(tan x/log cos x,x,pi/2);
- - infinity
- % - infinity
- z0 := z*(z-2*pi*i)*(z-pi*i/2)/(sinh z - i);
- 2 2
- z*( - 5*i*pi*z - 2*pi + 2*z )
- z0 := --------------------------------
- 2*(sinh(z) - i)
- limit(df(z0,z),z,pi*i/2);
- sign(i)*infinity
- % infinity
- z1 := z0*(z-pi*i/2);
- 3 2 2 3
- z*(2*i*pi - 12*i*pi*z - 9*pi *z + 4*z )
- z1 := -------------------------------------------
- 4*(sinh(z) - i)
- limit(df(z1,z),z,pi*i/2);
- - 2*pi
- % -2*pi
- % and the analogous problem:
- z2 := z*(z-2*pi)*(z-pi/2)/(sin z - 1);
- 2 2
- z*(2*pi - 5*pi*z + 2*z )
- z2 := ---------------------------
- 2*(sin(z) - 1)
- limit(df(z2,z),z,pi/2);
- - infinity
- % infinity
- z3 := z2*(z-pi/2);
- 3 2 2 3
- z*( - 2*pi + 9*pi *z - 12*pi*z + 4*z )
- z3 := ------------------------------------------
- 4*(sin(z) - 1)
- limit(df(z3,z),z,pi/2);
- 2*pi
- % 2*pi
- % A test by Wolfram Koepf.
- f:=x^2/(3*(-27*x^2 - 2*x^3 + 3^(3/2)*(27*x^4 + 4*x^5)^(1/2))^(1/3));
- 2
- x
- f := --------------------------------------------------------
- 2 3 2 1/3
- 3*(3*sqrt(4*x + 27)*sqrt(3)*abs(x) - 2*x - 27*x )
- L0:=limit(f,x,0);
- l0 := 0
- % L0 := 0
- f1:=((f-L0)/x^(1/3))$
- L1:=limit(f1,x,0);
- l1 := 0
- % L1 := 0
- f2:=((f1-L1)/x^(1/3))$
- L2:=limit(f2,x,0);
- - 1
- l2 := ------
- 1/3
- 2
- % L2 := -1/2^(1/3)
- f3:=((f2-L2)/x^(1/3))$
- L3:=limit(f3,x,0);
- l3 := 0
- % L3 := 0
- f4:=((f3-L3)/x^(1/3))$
- L4:=limit(f4,x,0);
- l4 := 0
- % L4 := 0
- f5:=((f4-L4)/x^(1/3))$
- L5:=limit(f5,x,0);
- 2/3
- - 2
- l5 := ---------
- 81
- % L5 = -2^(2/3)/81
- f6:=((f5-L5)/x^(1/3))$
- L6:=limit(f6,x,0);
- l6 := 0
- % L6 := 0
- f7:=((f6-L6)/x^(1/3))$
- L7:=limit(f7,x,0);
- l7 := 0
- % L7 := 0
- f8:=((f7-L7)/x^(1/3))$
- L8:=limit(f8,x,0);
- 7
- l8 := -----------
- 1/3
- 6561*2
- % L8 := 7/(6561*2^(1/3))
- limit(log(1+x)^2/x^(1/3),x,infinity);
- 0
- % 0
- limit(e^(log(1+x)^2/x^(1/3)),x,infinity);
- 1
- % 1
- ss := (sqrt(x^(2/5) +1) - x^(1/3)-1)/x^(1/3);
- 2/5 1/3
- sqrt(x + 1) - x - 1
- ss := ---------------------------
- 1/3
- x
- limit(ss,x,0);
- -1
- % -1
- limit(exp(ss),x,0);
- 1
- ---
- e
- % 1/e
- limit(log x,x,-1);
- log(-1)
- % log(-1)
- limit(log(ss),x,0);
- log(-1)
- % log(-1)
- ss := ((x^(1/2) - 1)^(1/3) + (x^(1/5) + 1)^2)/x^(1/5);
- 1/3 2/5 1/5
- (sqrt(x) - 1) + x + 2*x + 1
- ss := --------------------------------------
- 1/5
- x
- limit(ss,x,0);
- 2
- % 2
- h := (X^(1/5) + 3*X**(1/4))^2/(7*(SQRT(X + 9) - 3 - x/6))**(1/5);
- 1/5 2/5 9/20
- 6 *(x + 6*x + 9*sqrt(x))
- h := -----------------------------------
- 1/5 1/5
- (6*sqrt(x + 9) - x - 18) *7
- limit(h,x,0);
- 3/5
- - 6
- ---------
- 1/5
- 7
- % -6^(3/5)/7^(1/5)
- end;
- (TIME: limits 28710 30110)
|