Adept Scientific - English
The world's best software and hardware for research, science and engineering.
flag arrow
clearclear

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKdedksvnofi
Home
Products
Training
Events
 Buy Online
Downloads
Academic Discounts
Support
My Adept
International |  About Us |  Adept Scientific Blog |  Contact Us |  Press Room |  Jobs
Adept Scientific on Facebook Adept Scientific on Twitter Adept Scientific on YouBube Adept Scientific on LinkedIn


The Next Steps

• Ask us a question
• Watch Maple Video Demonstrations
• Buy Maple Now
• View Maple Pricing
• Download a Brochure
• Request a Brochure
• Request an Evaluation
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 16 Overview
Maple 16 Professional
Maple 16 Academic
Maple 16 Student Use
What's New in Maple 16
Maple New Features
Datasheet

Maple History
Recorded Online Seminars

MapleSim
MapleNet
Maple T.A.
BlockImporter™
Maple Toolboxes

Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

Latest Information

New Features: Professional
New Features: Academic
Maple Features
The Maple Reporter Online

Service & Support

Maple Primes
blogs, forums etc

Elite Maintenance Program
Application Centre
Powertools
Search the Knowledge Base
Technical Support request

List Archives >  Maple User Group List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MUG] missing definite integral

Search email archive for  

[MUG] missing definite integral
Author: Rob Scott    Posted: Thu, 24 Jan 2002 08:48:55 -0500

>> From: Rob Scott />


The following definite integral has a solution in terms of erf:

assume(a>0, b>0, c::real);

int( sin(a * x) * cos(b * x) * exp(- c^2 * x^2) / x, x = 0 .. infinity);

maple can't handle this though the correct solution is:

Pi/4 * ( erf( (a-b)/2/c ) + erf( (a+b)/2/c ) )

P.S.
Sorry if this list is the correct forum for this comment.


[MUG] Re: missing definite integral
Author: Maple User Group    Posted: Fri, 1 Feb 2002 11:46:13 -0500 (

>> From: Maple User Group />
>> From: Rob Scott /> | The following definite integral has a solution in terms of erf:
| assume(a>0, b>0, c::real);
| int( sin(a * x) * cos(b * x) * exp(- c^2 * x^2) / x, x = 0 .. infinity);
| maple can't handle this though the correct solution is:
| Pi/4 * ( erf( (a-b)/2/c ) + erf( (a+b)/2/c ) )

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Fri, 25 Jan 2002 18:28:15 -0500
To: /> From: "Gerald A. Edgar" /> Subject: missing definite integral


I do not think Maple (nor any other program) claims to do all known
definite integrals. At least Maple does this:

> int(sin(a*x)*cos(a*x)*exp(-c^2*x^2)/x,x=0..infinity);

2 1/2
Pi (c ) erf(a/c)
1/4 -------------------
c

And with some help from me, it can do the one in question:

2 2
sin(a x) cos(b x) exp(-c x )
-----------------------------
x
> combine(%);

2 2 2 2
exp(-c x ) sin(a x + b x) + exp(-c x ) sin(a x - b x)
1/2 -------------------------------------------------------
x

> int((exp(-c^2*x^2)*sin((a+b)*x)+exp(-c^2*x^2)*sin((a-b)*x))
> /x/2,x=0..infinity);

a + b a - b
Pi c erf(1/2 -----) 1/4 Pi c erf(1/2 -----)
c c
1/4 ------------------- + -----------------------
2 1/2 2 1/2
(c ) (c )


--
Gerald A. Edgar />

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

From: "Willard, Daniel Dr DUSA-OR" /> To: /> Subject: missing definite integral
Date: Mon, 28 Jan 2002 10:16:03 -0500


But note that sin(a*x)*cos(b*x)=1/2((sin(a+b)*x)+sin((a-b)*x)) and Maple
recognizes the integrals of these terms separately.


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Mon, 28 Jan 2002 18:58:41 -0600 (CST)
From: Brian Blank /> To: /> Subject: missing definite integral

Since you are not assuming that c is positive the expression that you say
is correct should not depend on sgn(c).

Maple knows how to do this integral correctly but you must prepare the
integrand first.

> restart;
> assume(a , positive, b , positive , c , real ):
> Int( sin(a*x) * cos(b*x) * exp(-c^2*x^2) / x, x = 0 .. infinity):
> map(combine, %): # In Release 4 use " instead of %
> e1 := student[integrand](%):
> expand(expandoff()):
> expandoff(sin):
> expand(e1):
> map(z -> Int(z, x = 0 .. infinity), % ):
> map(factor, %): # Regrettable!
> value(%);


| c | a 1/2 | c | b
1/4 Pi erf(1/2 ------- + -----------)
2 2
c c

| c | a | c | b
+ 1/4 Pi erf(1/2 ------- - 1/2 -------)
2 2
c c

with assumptions on c, a and b


Brian Blank
Department of Mathematics
Washington University in St. Louis,
St. Louis, MO 63130







[MUG] Re: missing definite integral
Author: Carl Devore    Posted: Thu, 31 Jan 2002 21:40:23 -0500

>> From: Carl Devore />
On Thu, 24 Jan 2002, Rob Scott wrote:
> The following definite integral has a solution in terms of erf:
> assume(a>0, b>0, c::real);
> int( sin(a * x) * cos(b * x) * exp(- c^2 * x^2) / x, x = 0 .. infinity);
>
> maple can't handle this though the correct solution is:
>
> Pi/4 * ( erf( (a-b)/2/c ) + erf( (a+b)/2/c ) )


If we apply a trivial identity to the trig factors, then Maple can do the
integral. Why Maple can't apply the identity automatically is a an
interesting question discussed (but not answered) afterwards.

> restart;

Making assumptions about a and b is unncessary and does not affect Maple's
ability to do the problem. Without loss of generality, we may assume c>0.
This also does not affect Maple's ability to do the problem. It just
makes the answer simplify neater.

> assume(c>0);

The trig identity is:

> combine(sin(a*x)*cos(b*x));

1/2 sin(a x + b x) + 1/2 sin(a x - b x)

Note the distributed form of the arguments. Surprisingly, this turns out
to be why Maple can't do the problem.

I will enter the integral with those arguments factored.

> (1/2)*Int((sin((a+b)*x)+sin((a-b)*x))*exp(-c^2*x^2)/x, x= 0..infinity);

infinity
/ 2 2
| (sin((a + b) x) + sin((a - b) x)) exp(-c~ x )
1/2 | ---------------------------------------------- dx
| x
/
0

> value(%);

a + b a - b
1/4 Pi erf(1/2 -----) + 1/4 Pi erf(1/2 -----)
c~ c~

The form that this answer is returned in seems random, even after doing
restarts. This is perhaps related to the "random returns from radsimp".
I obtained all of the following forms *even after doing restarts*

> value(%);
a + b
Pi (1/2 a + 1/2 b) erf(1/2 -----)
c~
1/2 ---------------------------------
a + b

a - b
1/2 Pi (1/2 a - 1/2 b) erf(1/2 -----)
c~
+ -------------------------------------
a - b

> value(%);

a - b
1/2 Pi (1/2 a - 1/2 b) erf(1/2 -----)
a + b c~
1/4 Pi erf(1/2 -----) + -------------------------------------
c~ a - b

> value(%);

a + b
Pi (1/2 a + 1/2 b) erf(1/2 -----)
c~ a - b
1/2 --------------------------------- + 1/4 Pi erf(1/2 -----)
a + b c~


They can all trivially be seen to be equivalent to the simplified form.
It is just a question of whether the (a+b) and/or (a-b) gets factored out
of the numerators.


Now I do the integral with the sine arguments distributed:

> Int((sin(a*x+b*x)+sin(a*x-b*x))*exp(-c^2*x^2)/x, x= 0..infinity);

infinity
/ 2 2
| (sin(a x + b x) + sin(a x - b x)) exp(-c~ x )
| ---------------------------------------------- dx
| x
/
0

> value(%);

infinity
/ 2 2
| (sin(a x + b x) + sin(a x - b x)) exp(-c~ x )
| ---------------------------------------------- dx
| x
/
0

Maple decides quickly that it can't do it. Let's investigate the
distinction. The distinction remains if I simplify the problem one sine
term and set c=1, b=1.

> restart;
> infolevel[all]:= 5:
> Int(sin(a*x+x)*exp(-x^2)/x, x= 0..infinity);

infinity
/ 2
| sin(a x + x) exp(-x )
| --------------------- dx
| x
/
0

> value(%);

Maple will try many different things below. So the following output is
lengthy. (I have deleted some of it).


int/elliptic: trying elliptic integration
int/ellalg/elltype: Checking for an elliptic integral sin(a*x+x)*exp(-x^2)/x freeof(x) x
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/trigexp: case of integrand containing exp and trigs
combine: combining with respect to trig
combine: combining with respect to exp
int/rischnorm: enter Risch-Norman integrator
sqrfree/Yun: square-free factorization in T[3]
sqrfree/Yun: square-free factorization in T[1]
int/rischnorm: exit Risch-Norman integrator
int/risch: enter Risch integration
int/risch/algebraic1: RootOfs should be algebraic numbers and functions
radnormal/addrads: radicals are {`radnormal/Radical`(-1,2,0)}
radnormal/addone: adding a single radical
radnormal/addone: radical is `radnormal/Radical`(-1,2,0)
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0) = RootOf(_Z^2+1,index = 1)]
radfield: backward substitutions are [RootOf(_Z^2+1,index = 1) = I]
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0) = RootOf(_Z^2+1,index = 1)]
radfield: backward substitutions are [RootOf(_Z^2+1,index = 1) = I]
solve/linear: # equations 3
evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.729
solve/linear/sparse/polyalg: # equations is: 2
radfield: computing a basis for {RootOf(_Z^2+1,index = 1)}
radnormal/addtop: algebraics are {`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`)}
radnormal/addrads: adding 1 radicals
radnormal/addrads: radicals are {`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`)}
radnormal/addone: adding a single radical
radnormal/addone: radical is `radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`)
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`) = RootOf(_Z^2+1,index = 1)]
radfield: backward substitutions are []
int/risch: the field extensions are

2 2
[x~, exp(-x~ ), exp(RootOf(_Z + 1, index = 1) (a x~ + x~))]

int/risch: Introduce the namings:

2
{_th[1] = exp(-x~ ),

2
_th[2] = exp(RootOf(_Z + 1, index = 1) (a x~ + x~))}

int/risch/int: integrand is

/ 1 \
|_th[2] - ------| _th[1]
\ _th[2]/
------------------------
x~

int/risch/int: integrand expressed as

_th[1] _th[2] _th[1]
------------- - ---------
x~ x~ _th[2]

int/risch/exppoly: integrating

_th[1] _th[2] _th[1]
------------- - ---------
x~ x~ _th[2]

int/risch/diffeq: solving Risch d.e. y' + f y = g where f,g are:

2 _th[1]
RootOf(_Z + 1, index = 1) (a + 1), ------
x~

evala/Indep: testing independence of RootOfs
evala/Indep: number of RootOfs 1
evala/Indep: number of RootOfs 1
evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.800
int/risch/DEexp: solving Risch d.e. y' + f y = g where f,g are:

2 _th[1]
RootOf(_Z + 1, index = 1) (a + 1), ------
x~

int/risch/int: integrand is

2
RootOf(_Z + 1, index = 1) (a + 1)

int/ratpoly/horowitz: integrating

2
RootOf(_Z + 1, index = 1) (a + 1)

int/risch/ratpoly: result is

2
RootOf(_Z + 1, index = 1) (a + 1) x~

radfield: computing a basis for {RootOf(_Z^2+1,index = 1)}
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`) = RootOf(_Z^2+1,index = 1)]
radfield: computing a basis for {RootOf(_Z^2+1,index = 1)}
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`) = RootOf(_Z^2+1,index = 1)]
solve/linear: # equations 3
solve/linear/sparse/polyalg: # equations is: 2
int/risch/diffeq: solving Risch d.e. y' + f y = g where f,g are:

2 1
-2 x~ + RootOf(_Z + 1, index = 1) (a + 1), ----
x~

evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.879
evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.879
evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.879
evala/inv: heuristic succeeded
evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.889
evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.889
evala/Reduce/nf/urad: Reducing radicals [RootOf(_Z^2+1,index = 1)] at time 157.889
int/risch/DEratpoly: solving Risch d.e. y' + f y = g where f,g are:

2
RootOf(_Z + 1, index = 1)

2 1
(2 RootOf(_Z + 1, index = 1) x~ + a + 1), ----
x~

int/risch/exppoly: Risch d.e. has no solution
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
combine: combining with respect to exp
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
int/prpexp: case ratpoly*exp(arg)
int/rischnorm: enter Risch-Norman integrator
radfield: computing a basis for {RootOf(_Z^2+1,index = 1)}
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`) = RootOf(_Z^2+1,index = 1)]
radfield: computing a basis for {RootOf(_Z^2+1,index = 1)}
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`) = RootOf(_Z^2+1,index = 1)]
solve/linear: # equations 3
solve/linear/sparse/polyalg: # equations is: 2
int/rischnorm: exit Risch-Norman integrator
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
combine: combining with respect to exp
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
int/prpexp: case ratpoly*exp(arg)
int/rischnorm: enter Risch-Norman integrator
radfield: computing a basis for {RootOf(_Z^2+1,index = 1)}
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`) = RootOf(_Z^2+1,index = 1)]
radfield: computing a basis for {RootOf(_Z^2+1,index = 1)}
radfield: field is {RootOf(_Z^2+1,index = 1)}
radfield: extension degree is 2
radfield: substitutions are [`radnormal/Radical`(-1,2,0,`radnormal/notation/RootOf`) = RootOf(_Z^2+1,index = 1)]
solve/linear: # equations 3
solve/linear/sparse/polyalg: # equations is: 2
int/rischnorm: exit Risch-Norman integrator
int/risch: exit Risch integration
int/definite/contour: contour integration

infinity
/ 2
| sin(a x + x) exp(-x )
| --------------------- dx
| x
/
0


Constrast that with the factored form. The following output is brief.
Maple finds the correct approach very quickly.

> restart;
> infolevel[all]:= 5:
> Int(sin((a+1)*x)*exp(-x^2)/x, x= 0..infinity);

infinity
/ 2
| sin((a + 1) x) exp(-x )
| ----------------------- dx
| x
/
0

> value(%);
simplify/do: applying simplify/exp function to expression
simplify/do: applying simplify/exp function to expression
simplify/do: applying commonpow function to expression
simplify/do: applying power function to expression
simplify/do: applying simplify/exp function to expression
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/indef2: applying algebraic substitution
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/indef2: applying change of variables
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
int/prpexp: case ratpoly*exp(arg)

1/2 Pi erf(1/2 a + 1/2)

The next step is to turn trace on and see where the differences in the
problems start. But I don't feel like it now.


Let's see what happens with a simple problem.

> restart;
> infolevel[all]:= 5:
> int(sin(a*x+x), x);
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/indef2: applying change of variables
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration

cos((a + 1) x)
- --------------
a + 1

Note that the answer is returned in argument-factored form.




Previous by date: [MUG] Bug in LinearAlgebra:-GenerateMatrix?, Bernhard Roider
Next by date: [MUG] large program on the web, modules vs. worksheets?,  Dr David Levitt
Previous thread: [MUG] Is the any `maple-compiler`?,  Andrey Siver
Next thread: [MUG] large program on the web, modules vs. worksheets?,  Dr David Levitt



Ready to buy?

For more pricing information:
Visit our webstore, call us on +1 800 724 8380 or email us at info@adeptscience.com

Featured Downloads

Maple 16 & MapleSim 5 Professional Brochure
Maple 16 Academic Datasheet
Maple 16 & MapleSim 5 Academic Brochure
Maple 16 What is New datasheet
Maple 16 Professional Datasheet
Maple Whitepaper: Driving Innovation - How mathematical modeling and optimisation increase efficiency and productivity in vehicle design.
MapleSim Whitepaper - Technological Superiority in Multi-Domain Physical Modelling and Simulation

Latest Downloads

Maple 16 Programming Guide
Maple 16 User Manual
Maple 16 Academic Datasheet
Maple 16 Professional Datasheet
Maple 16 & MapleSim 5 Academic Brochure

Product Reviews

"Without the Maple software, we would have to spend weeks generating the equations of motion for every experiment. Then the chances that we did it right would basically be near zero. There would always be a mistake somewhere. It is very difficult to set up a dynamic motion model by hand."
- Jean-Claude PiedBeouf, Ph.D Manager of Robotics, Canadian Space Agency

"Its very good - highly accurate and easy to use. The speed of Maple allows me to change equations and quickly reintegrate them into the application, so more possibilities can be explored to achieve the precise effect desired."
Shawn Neely, Senior R & D Director for PDI/Dreamworks

Latest News

Connectivity to major CAD systems extended in Maple 16
MapleSim Breaks New Ground in Hardware-in-the-Loop real-time simulation for planetary rovers
MapleSim Breaks New Ground in Hardware-in-the-Loop real-time simulation for planetary rovers
Maths software usability reaches new heights with Maple 16
"MapleSim was an eye-opener for us.
adept

Top of the Page

Popular Links: ChemDraw | ChemOffice | Data Acquisition | Data Analysis | EndNote | Maple | MapleSim | Mathcad | MathType | Quality Analyst | Reference Manager | VisSim

EU ePrivacy Directive | Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2012, Adept Scientific plc.
Site designed and maintained by Lyndon Ash

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055