Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Quad_qagi Calculator

Quad_qagi

Function: quad_qagi (<f(x)>, <x>, <a>, <b>, [<epsrel>, <epsabs>, <limit>])

declare(A, constant);
declare(C, constant);
dgtr(theta):=(C)/((A^2)*(cos(theta)^2) + (sin(theta)^2))^2;
pdfh(theta):=dgtr(theta)*cos(theta);
dpdfphi(theta) := pdfh(theta) * sin(theta);
pdfphi(phi):=integrate(dpdfphi(theta), theta, 0, %pi/2);
pdfphi(phi);
pdftheta(theta) = pdfphi(phi)/pdfh(theta);
cdfphi(x):=integrate(pdfphi(phi),phi,0,x);
cdftheta(x):=integrate(pdftheta(theta),theta,0,x);
f(x):=integrate(x * y, y, 0, 1 - x);
f(x);
expand(f(x));
g(x):=integrate(f(x), x);
g(x);
plot2d([g(x)], [x, 0, 2], [y, -0.5, 2.5]);
quad_qagi(f(x), x, 0, inf);
A:1 / quad_qagi(f(x), x, 0, inf);

Function: quad_qagi (<f>, <x>, <a>, <b>, [<epsrel>, <epsabs>, <limit>]) Integration of a general function over an infinite or semi-infinite interval. The interval is mapped onto a finite interval and then the same strategy as in quad_qags is applied.

quad_qagi evaluates one of the following integrals

integrate (f(x), x, a, inf)

integrate (f(x), x, minf, a)

integrate (f(x), x, minf, inf)

using the Quadpack QAGI routine. The function to be integrated is <f(x)>, with dependent variable <x>, and the function is to be integrated over an infinite range.

The integrand may be specified as the name of a Maxima or Lisp function or operator, a Maxima lambda expression, or a general Maxima expression.

One of the limits of integration must be infinity. If not, then quad_qagi will just return the noun form.

The keyword arguments are optional and may be specified in any order. They all take the form key=val. The keyword arguments are:

<epsrel> Desired relative error of approximation. Default is 1d-8.

<epsabs> Desired absolute error of approximation. Default is 0.

<limit> Size of internal work array. <limit> is the maximum number of subintervals to use. Default is 200.

quad_qagi returns a list of four elements:

* an approximation to the integral,

* the estimated absolute error of the approximation,

* the number integrand evaluations,

* an error code.

The error code (fourth element of the return value) can have the values:

0 no problems were encountered;

1 too many sub-intervals were done;

2 excessive roundoff error is detected;

3 extremely bad integrand behavior occurs;

4 failed to converge

5 integral is probably divergent or slowly convergent

6 if the input is invalid.

Examples:

          (%i1) quad_qagi (x^2*exp(-4*x), x, 0, inf, epsrel=1d-8);
          (%o1)        [0.03125, 2.95916102995002E-11, 105, 0]
          (%i2) integrate (x^2*exp(-4*x), x, 0, inf);
                                         1
          (%o2)                          --
                                         32

(%o1)                                true
(%i2) 

Quad_qagi Example

Related Examples

quad_qagi-sin

quad_qagi(x^2*sin(2*x...

Calculate

quad_qagi

quad_qagi(d*x/(exp^(x...

Calculate

quad_qagi-sin

quad_qagi(sin(x)/(%ex...

Calculate

quad_qagi-sin

quad_qagi(x^2*sin(2*x...

Calculate

quad_qagi-sin

quad_qagi(sin(x)/(%ex...

Calculate

quad_qagi

quad_qagi(d*x/(exp^(x...

Calculate

quad_qagi-sin

f : sin(x)/((exp^x)-(...

quad_qagi(f,x,1,10);

Calculate

quad_qagi

quad_qagi(1/(%e^x-%e^...

Calculate

quad_qagi-sin

quad_qagi(sin(x)/((ex...

Calculate

quad_qagi-sin

quad_qagi(sin(x)/(exp...

Calculate