123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128 |
- Tue Feb 10 12:28:32 2004 run on Linux
- *** ci already defined as operator
- *** si already defined as operator
- % Test cases for definite integration.
- int(x/(x+2),x,2,6);
- 2*( - log(2) + 2)
- int(sin x,x,0,pi/2);
- 1
- int(log(x),x,1,5);
- 5*log(5) - 4
- int((1+x**2/p**2)**(1/2),x,0,p);
- p*(sqrt(2) + log(sqrt(2) + 1))
- --------------------------------
- 2
- int(x**9+y+y**x+x,x,0,2);
- 2
- 10*log(y)*y + 522*log(y) + 5*y - 5
- -------------------------------------
- 5*log(y)
- % Collected by Kerry Gaskell, ZIB, 1993/94.
- int(x^2*log(1+x),x,0,infinity);
- 2
- int(x *log(1 + x),x,0,infinity)
- int(x*e^(-1/2x),x,0,infinity);
- 4
- int(x/4*e^(-1/2x),x,0,infinity);
- 1
- int(sqrt(2)*x^(1/2)*e^(-1/2x),x,0,infinity);
- 2*sqrt(pi)
- int(x^(3/2)*e^(-x),x,0,infinity);
- 3*sqrt(pi)
- ------------
- 4
- int(sqrt(pi)*x^(3/2)*e^(-x),x,0,infinity);
- 3*pi
- ------
- 4
- int(x*log(1+1/x),x,0,infinity);
- 1
- int(x*log(1 + ---),x,0,infinity)
- x
- int(si(1/x),x,0,infinity);
- 1
- int(si(---),x,0,infinity)
- x
- int(cos(1/x),x,0,infinity);
- 1
- int(cos(---),x,0,infinity)
- x
- int(sin(x^2),x,0,infinity);
- sqrt(pi)*sqrt(2)
- ------------------
- 4
- int(sin(x^(3/2)),x,0,infinity);
- 2/3 5
- sqrt(pi)*2 *gamma(---)
- 6
- --------------------------
- 2
- 3*gamma(---)
- 3
- int(besselj(2,x),x,0,infinity);
- 1
- int(besselj(2,y^(5/4)),y,0,infinity);
- 4/5 7
- 2*2 *gamma(---)
- 5
- -------------------
- 8
- 5*gamma(---)
- 5
- int(x^(-1)*besselj(2,sqrt(x)),x,0,infinity);
- 1
- int(bessely(2,x),x,0,infinity);
- int(bessely(2,x),x,0,infinity)
- int(x*besseli(2,x),x,0,infinity);
- int(x*besseli(2,x),x,0,infinity)
- int(besselk(0,x),x,0,infinity);
- pi
- ----
- 2
- int(x^2*besselk(2,x),x,0,infinity);
- 3*pi
- ------
- 2
- int(sinh(x),x,0,infinity);
- int(sinh(x),x,0,infinity)
- int(cosh(2*x),x,0,infinity);
- int(cosh(2*x),x,0,infinity)
- int(-3*ei(-x),x,0,infinity);
- 3
- int(x*shi(x),x,0,infinity);
- int(x*shi(x),x,0,infinity)
- int(x*fresnel_c(x),x,0,infinity);
- int(x*fresnel_c(x),x,0,infinity)
- int(x^3*e^(-2*x),x,0,infinity);
- 3
- ---
- 8
- int(x^(-1)*sin(x/3),x,0,infinity);
- pi
- ----
- 2
- int(x^(-1/2)*sin(x),x,0,infinity);
- sqrt(pi)*sqrt(2)
- ------------------
- 2
- int(2*x^(-1/2)*cos(x),x,0,infinity);
- sqrt(pi)*sqrt(2)
- int(sin x + cos x,x,0,infinity);
- int(sin(x) + cos(x),x,0,infinity)
- int(ei(-x) + sin(x^2),x,0,infinity);
- sqrt(pi)*sqrt(2) - 4
- ----------------------
- 4
- int(x^(-1)*(sin (-2*x) + sin(x^2)),x,0,infinity);
- - pi
- -------
- 4
- int(x^(-1)*(cos(x/2) - cos(x/3)),x,0,infinity);
- 3
- - log(---)
- 2
- int(x^(-1)*(cos x - cos(2*x)),x,0,infinity);
- log(2)
- int(x^(-1)*(cos(x) - cos(x)),x,0,infinity);
- 0
- int(2,x,0,infinity);
- int(2,x,0,infinity)
- int(cos(x)*si(x),x,0,infinity);
- int(cos(x)*si(x),x,0,infinity)
- int(2*cos(x)*e^(-x),x,0,infinity);
- 1
- int(x/2*cos(x)*e^(-x),x,0,infinity);
- 0
- int(x^2/4*cos(x)*e^(-2*x),x,0,infinity);
- 1
- -----
- 125
- int(1/(2*x)*sin(x)*e^(-3*x),x,0,infinity);
- 1
- atan(---)
- 3
- -----------
- 2
- int(3/x^2*sin(x)*e^(-x),x,0,infinity);
- 3 - x
- int(----*sin(x)*e ,x,0,infinity)
- 2
- x
- int(cos(sqrt(x))*e^(-x),x,0,infinity);
- i 1/4
- sqrt( - pi)*erf(---) + 2*e
- 2
- -------------------------------
- 1/4
- 2*e
- int(e^(-x)*besselj(2,x),x,0,infinity);
- - 2*sqrt(2) + 3
- ------------------
- sqrt(2)
- int(cos(x^2)*e^(-x),x,0,infinity);
- 1 1 1 1 1
- (pi*( - 2*cos(---)*fresnel_s(---) + cos(---) + 2*fresnel_c(---)*sin(---)
- 4 4 4 4 4
- 1
- - sin(---)))/(2*sqrt(pi)*sqrt(2))
- 4
- int(erf(x)*e^(-x),x,0,infinity);
- 1/4 1
- e *( - erf(---) + 1)
- 2
- int(besseli(2,x)*e^(-x),x,0,infinity);
- - 1 1
- 2*hypergeometric({------},{},1) + hypergeometric({---},{},1) - 2
- 2 2
- int(e^(-x^2)*cos(x),x,0,infinity);
- sqrt(pi)
- ----------
- 1/4
- 2*e
- int(x^(-1)*sin(x)*cos(x),x,0,infinity);
- pi
- ----
- 4
- int(x^(-1)*sin(x)*cos(2*x),x,0,infinity);
- 0
- int(x^(-1)*sin(x)*cos(x/2),x,0,infinity);
- pi
- ----
- 2
- int(e^x,x,0,infinity);
- x
- int(e ,x,0,infinity)
- int(e^(-x^2 - x),x,0,infinity);
- 1/4 1
- e *pi*( - erf(---) + 1)
- 2
- ---------------------------
- 2*sqrt(pi)
- int(e^(-(x+x^2+1)),x,0,infinity);
- 1/4 1
- e *pi*( - erf(---) + 1)
- 2
- ---------------------------
- 2*sqrt(pi)*e
- int(e^(-(x+1/x)^2),x,0,infinity);
- sqrt(pi)
- ----------
- 4
- 2*e
- int(e^(-(x+2))*sin(x),x,0,infinity);
- 1
- ------
- 2
- 2*e
- int(-3*x*e^(-1/2x),x,0,infinity);
- -12
- int(x*e^(-1/2*x^2),x,0,infinity);
- 1
- int(x^2*besselj(2,x),x,0,infinity);
- 2
- int(x *besselj(2,x),x,0,infinity)
- int(x*besselk(1,x),x,0,infinity);
- pi
- ----
- 2
- int(-3*ei(-x),x,0,infinity);
- 3
- int(x^3*e^(-2*x^2),x,0,infinity);
- 1
- ---
- 8
- int(sqrt(2)/2*x^(-3/2)*sin x,x,0,infinity);
- sqrt(pi)
- int(x^(-1)*(sin(-2*x) + sin(x^2)),x,0,infinity);
- - pi
- -------
- 4
- int(x^(-1)*(cos(3*x) - cos(x/2)),x,0,infinity);
- - log(6)
- int(x^(-1)*(sin x - sin(2*x)),x,0,infinity);
- 0
- int(1/x*sin(x)*e^(-3*x),x,0,infinity);
- 1
- atan(---)
- 3
- int(sin(x)*e^(-x),x,0,infinity);
- 1
- ---
- 2
- int(x^(-1)*sin(x)*cos(x),x,0,infinity);
- pi
- ----
- 4
- int(e^(1-x)*e^(2-x^2),x,0,infinity);
- 1/4 3 1
- e *e *pi*( - erf(---) + 1)
- 2
- ------------------------------
- 2*sqrt(pi)
- int(e^(-1/2x),x,0,y);
- y/2
- 2*(e - 1)
- --------------
- y/2
- e
- int(si(x),x,0,y);
- si(y)*y - 1 + cos(y)
- int(besselj(2,x^(1/4)),x,0,y);
- 1/4 1/4
- - 2*((8*sqrt(y) - y)*besselj(0,y ) - besselj(2,y )*y
- 1/4 1/4 1/4 1/4
- + 4*y *(y + 2)*(y - 2)*besselj(1,y ))
- int(x*besseli(2,x),x,0,y);
- - (2*(besseli(0,y) - 1) - besseli(1,y)*y)
- int(x^(3/2)*e^(-x),x,0,y);
- y
- 3*sqrt(pi)*e *erf(sqrt(y)) - 4*sqrt(y)*y - 6*sqrt(y)
- ------------------------------------------------------
- y
- 4*e
- int(sinh(x),x,0,y);
- y 2
- (e - 1)
- -----------
- y
- 2*e
- int(cosh(2*x),x,0,y);
- 2*y y y
- (e + 1)*(e + 1)*(e - 1)
- ------------------------------
- 2*y
- 4*e
- int(x*shi(x),x,0,y);
- y y 2
- - (e *(e *(y - 1) - 2*shi(y)*y ) + y + 1)
- --------------------------------------------
- y
- 4*e
- int(x^2*e^(-x^2),x,0,y);
- 2
- y
- sqrt(pi)*e *erf(y) - 2*y
- ---------------------------
- 2
- y
- 4*e
- int(x^(-1)/2*sin(x),x,0,y);
- si(y)
- -------
- 2
- int(sin x + cos x,x,0,y);
- sin(y) + 1 - cos(y)
- int(sin x + sin(-2*x),x,0,y);
- - (2*cos(y) - 1 - cos(2*y))
- ------------------------------
- 2
- int(sin(n*x),x,0,y);
- - (cos(n*y) - 1)
- -------------------
- n
- int(heaviside(x-1),x,0,y);
- (y - 1)*heaviside(y - 1)
- % Tests of transformations defined in defint package.
- laplace_transform(1,x);
- 1
- ---
- s
- laplace_transform(x,x);
- 1
- ----
- 2
- s
-
- laplace_transform(x^a/factorial(a),x);
- 1
- ------
- a
- s *s
- laplace_transform(x,e^(-a*x),x);
- 1
- -----------------
- 2 2
- a + 2*a*s + s
- laplace_transform(x^k,e^(-a*x),x);
- gamma(k + 1)
- -------------------------
- k k
- (a + s) *a + (a + s) *s
-
- laplace_transform(cosh(a*x),x);
- - s
- ---------
- 2 2
- a - s
-
- laplace_transform(1/(2*a^3),sinh(a*x)-sin(a*x),x);
- - 1
- ---------
- 4 4
- a - s
- laplace_transform(1/(a^2),1-cos(a*x),x);
- 1
- -----------
- 2 3
- a *s + s
-
- laplace_transform(1/(b^2-a^2),cos(a*x)-cos(b*x),x);
- s
- ----------------------------
- 2 2 2 2 2 2 4
- a *b + a *s + b *s + s
- laplace_transform(besselj(0,2*sqrt(k*x)),x);
- 1
- --------
- k/s
- e *s
-
- laplace_transform(Heaviside(x-1),x);
- 1
- ------
- s
- e *s
- laplace_transform(1/x,sin(k*x),x);
- k
- atan(---)
- s
- laplace_transform(1/(k*sqrt(pi)),e^(-x^2/(4*k^2)),x);
- 2 2 2 2
- k *s k *s
- - e *erf(k*s) + e
-
- laplace_transform(1/k,e^(-k^2/(4*x)),x);
- besselk(1,sqrt(s)*k)
- ----------------------
- sqrt(s)
- laplace_transform(2/(sqrt(pi*x)),besselk(0,2*sqrt(2*k*x)),x);
- k/s k
- e *besselk(0,---)
- s
- ---------------------
- sqrt(s)
-
- hankel_transform(x,x);
- n + 4
- gamma(-------)
- 2
- -------------------
- n - 2 2
- gamma(-------)*s
- 2
-
- Y_transform(x,x);
- - n + 4 n + 4
- gamma(----------)*gamma(-------)
- 2 2
- -------------------------------------
- - n + 3 n - 1 2
- gamma(----------)*gamma(-------)*s
- 2 2
-
- K_transform(x,x);
- - n + 4 n + 4
- gamma(----------)*gamma(-------)
- 2 2
- ----------------------------------
- 2
- 2*s
-
- struveh_transform(x,x);
- - n - 3 n + 5
- gamma(----------)*gamma(-------)
- 2 2
- -------------------------------------
- - n - 2 n - 2 2
- gamma(----------)*gamma(-------)*s
- 2 2
- fourier_sin(e^(-x),x);
- s
- --------
- 2
- s + 1
-
- fourier_sin(sqrt(x),e^(-1/2*x),x);
- 3*atan(2*s)
- 2*sin(-------------)*pi
- 2
- --------------------------------
- 2 3/4
- sqrt(pi)*(4*s + 1) *sqrt(2)
-
- fourier_sin(1/x,e^(-a*x),x);
- s
- atan(---)
- a
-
- fourier_sin(x^k,x);
- k/2 - k k
- 4 *gamma(------)*gamma(---)*k
- 2 2
- ---------------------------------
- k k
- 4*s *2 *gamma( - k)*s
-
- fourier_sin(1/(b-a),(e^(-a*x)-e^(-b*x)),x);
- a*s + b*s
- ----------------------------
- 2 2 2 2 2 2 4
- a *b + a *s + b *s + s
- fourier_sin(besselj(0,a*x),x);
- 2 2
- - a + s
- heaviside(------------)
- 2
- a
- -------------------------
- 2 2
- sqrt( - a + s )
- fourier_sin(1/sqrt(pi*x),cos(2*sqrt(k*x)),x);
- k k
- sqrt(s)*sqrt(2)*cos(---) - sqrt(s)*sqrt(2)*sin(---)
- s s
- -----------------------------------------------------
- 2*s
- fourier_sin(1/(k*sqrt(pi)),e^(-x^2/(4*k^2)),x);
- erf(i*k*s)*i
- --------------
- 2 2
- k *s
- e
- fourier_cos(e^(-1/2x),x);
- 2
- ----------
- 2
- 4*s + 1
-
- fourier_cos(x,e^(-x),x);
- 2
- - s + 1
- ---------------
- 4 2
- s + 2*s + 1
-
- fourier_cos(x,e^(-1/2*x^2),x);
- 2
- i*s s /2
- sqrt(pi)*erf(---------)*i*s + e *sqrt(2)
- sqrt(2)
- ---------------------------------------------
- 2
- s /2
- e *sqrt(2)
-
- fourier_cos(2*x^2,e^(-1/2x),x);
- 2
- - 384*s + 32
- ---------------------------
- 6 4 2
- 64*s + 48*s + 12*s + 1
-
- fourier_cos(x,e^(-a*x),x);
- 2 2
- a - s
- -------------------
- 4 2 2 4
- a + 2*a *s + s
-
- fourier_cos(x^n,e^(-a*x),x);
- s s
- cos(atan(---)*n + atan(---))*gamma(n + 1)
- a a
- -------------------------------------------
- 2 2 (n + 1)/2
- (a + s )
-
- fourier_cos(1/x,sin(k*x),x);
- 2 2
- sign(k - s )*pi + pi
- -----------------------
- 4
- fourier_cos(1/sqrt(pi*x),cos(2*sqrt(k*x)),x);
- k k
- sqrt(s)*sqrt(2)*cos(---) + sqrt(s)*sqrt(2)*sin(---)
- s s
- -----------------------------------------------------
- 2*s
-
- fourier_cos(1/(k*sqrt(pi)),e^(-x^2/(4*k^2)),x);
- 1
- --------
- 2 2
- k *s
- e
- fourier_cos(1/(pi*x),sin(2*k*sqrt(x)),x);
- 2 2
- k k
- intfc(----) + intfs(----)
- s s
-
- fourier_cos(1/(sqrt(pi*x)),e^(-2*k*sqrt(x)),x);
- 2 2 2
- k k k
- ( - 2*sqrt(s)*cos(----)*fresnel_s(----) + sqrt(s)*cos(----)
- s s s
- 2 2 2
- k k k
- + 2*sqrt(s)*fresnel_c(----)*sin(----) - sqrt(s)*sin(----))/(sqrt(2)*s)
- s s s
- laplace_transform(x^n/factorial(n)*e^(-a*x),x);
- 1
- -------------------------
- n n
- (a + s) *a + (a + s) *s
- laplace_transform(1/(2*a^2)*(cosh(a*x)-cos(a*x)),x);
- - s
- ---------
- 4 4
- a - s
- laplace_transform(k*a^k/x*besselj(k,a*x),x);
- 2*k
- a
- ----------------------
- 2 2 k
- (sqrt(a + s ) + s)
-
- fourier_sin(1/x*e^(-3*x),x);
- s
- atan(---)
- 3
-
- fourier_sin(1/(pi*x)*sin(2*k*sqrt(x)),x);
- 2 2
- k k
- intfc(----) - intfs(----)
- s s
- fourier_cos(x^n*e^(-a*x),x);
- s s
- cos(atan(---)*n + atan(---))*gamma(n + 1)
- a a
- -------------------------------------------
- 2 2 (n + 1)/2
- (a + s )
-
- fourier_cos(1/(k*sqrt(pi))*e^(-x^2/(4*k^2)),x);
- 1
- --------
- 2 2
- k *s
- e
- end;
- Time for test: 7010 ms, plus GC time: 300 ms
|