Items tagged with integration integration Tagged Items Feed

I am currently running into an issue where the numerical solution to an equation (involving an integral, yes, but the value I am solving for is simly a constant in the integral) is taking significantly longer than I would hope it would to solve. I am solving a similar equation (with a simpler expression) and it is significantly easier to solve, and I am hoping for that kind of speed.

On the last two lines in the attachment, I have two expressions. The penultimate expression is the baseline speed that I would like to match. The last expression is the fsolve I would like to speed up.

Is there any way to numerically speed up the process? I found that when I did tracelast after halting the process, there were HUGE numbers being added and subtracted, multiplied and divided. Not only did this significantly slow down the proecss but it also adds much numerical instability, which I would also like to avoid.

All help would be appreciated.

Hi, all

I use INT to calculate multiple integration as below. It runs more than 20 hours without results. I wander is there any problem in my codes.

A := sin(k*Pi*(x-h*cos(theta))/a)*sin(l*Pi*(y-h*sin(theta))/b)*sin(k[0]*h)*sin(k*Pi*x/a)*sin(l*Pi*y/b);

W := evalf[5](int(int(int(int(A, h = 0 .. (x-a)/cos(theta)), theta = Pi+arctan((b-y)/(a-x)) .. 3*Pi*(1/2)), x = 0 .. a), y = 0 .. b, numeric))



according to help on Combine

The Combine command combines integrals using linearity. The parameter v is any expression involving definite or indefinite integrals.

So, why I get an error from the following?

expr:=Int(sin(x),x) + Int(cos(x),x);


Error, (in IntegrationTools:-Combine) invalid subscript selector

 Standard Worksheet Interface, Maple 18.02, Windows 7, October  20 2014






Hello everyone,

I'm using Maple18, I tried to integrate the function including natural logarithm:


But we get the answer:

Is there any simple way to directly convert the answer to the kind of form we want? I cannot not finish the conversion:


So the toolbox "IntegrationTools" was used, but finally, we couldn't compute the integral:


 However, we can get the correct answer by manually inputting the formula.


Using IntegrationTools is pretty nasty and not very convenient, such as the problem I mentioned.

Does anyone have another solution?

The problem is The square root of 16-x^2 over the interval [0,-4]  0 being the upper bound, -4 being the lower bound.  I have solved 3/4s of this problem but I don't understand what they mean by "Solve the definite integral exactly by geometry".

restart; with(LinearAlgebra)


dF := -.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t);




e3 := `<,>`(1, 1, 1); E := proc (m) options operator, arrow; IdentityMatrix(m) end proc; beta := `<|>`(.1, .6, .3); S := `<|>`(`<,>`(-3, 1, 1), `<,>`(1, -5, 2), `<,>`(0, 2, -4)); S0 := -S.e3

beta := Vector[row](3, {(1) = .1, (2) = .6, (3) = .3})


S := Matrix(3, 3, {(1, 1) = -3, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = -5, (2, 3) = 2, (3, 1) = 1, (3, 2) = 2, (3, 3) = -4})


S0 := Vector(3, {(1) = 2, (2) = 2, (3) = 1})


Z := `<|>`(x, y, z)

Z := Vector[row](3, {(1) = x, (2) = y, (3) = z})


ME := MatrixExponential(S+Typesetting:-delayDotProduct(S0, Z), t);

`[Length of output exceeds limit of 1000000]`


MEint := map(int, ME.dF, t = 0 .. infinity)

Error, (in int) wrong number (or type) of arguments: wrong type of integrand passed to definite integration.


`&beta;plus&Assign;solve`(Z = beta.MEint, Z)

"(RTABLE(18446744074195006390,VECTOR([x, y, z]),Vector[row])=RTABLE(18446744074193876574,VECTOR([.1, .6, .3]),Vector[row]).MEint) betaplus:=solve (RTABLE(18446744074195006390,VECTOR([x, y, z]),Vector[row]))"



1step- I want to integrate the (ME*dF) from t=0 to ∞ .

2step- Evaluate Z=<x,y,z> by solving Z=β*MEint.


I have updated  Maple from 18.01 to 18.02, but there is something strange happened to me. I can not use int anymore. Here is my codes:

Error, (in int) wrong number (or type) of arguments: invalid option value passed to indefinite integration: {}

print(`output redirected...`); # input placeholder
    Maple 18.00, X86 64 LINUX, Feb 10 2014, Build ID 922027


Here is the screenshot:

A customer on Twitter recently asked why Maple gives the following result:



The issue here is that the t in f(t) is the same as the integration variable. 140 characters is not a lot to work with for a reply, so here is a longer explanation.


First, note that the process of integration treats the integration variable differently than the other variables, so that replacing another variable by the integration variable has a different effect depending on whether the replacement is done before or after the integration is performed. Consider this simple example:


a := int(t, t)



eval(a, t = x)



a := int(x, t)




eval(a, t = x)




In other words, integration does not commute with substitution. This is a fundamental property of integration and in fact, Maple's eval has special rules to take this into account when you ask it to replace the integration variable.  For example, if you evaluate the inert form of the integral at x = y, the substitution is performed explicitly:



eval(Int(x-t, t = 0 .. x), x = y)

Int(y-t, t = 0 .. y)


value(Int(y-t, t = 0 .. y))




However, if you try to evaluate at x = t, the evaluation is delayed until after the integral is evaluated:


eval(Int(x-t, t = 0 .. x), x = t)

eval(Int(x-t, t = 0 .. x), {x = t})



value(eval(Int(x-t, t = 0 .. x), {x = t}))




The eval command knows it shouldn't substitute into an integral when the substitution involves the variable of integration.


However, in the user's example, asking Maple for f(t) is equivalent to substitution directly before the integration is performed, like this:


subs(x = t, Int(x-t, t = 0 .. x))

Int(0, t = 0 .. t)


which of course gives:






Another way to have the two t variables be considered distinct is to explicitly make the integration variable a dummy by declaring it local:


f := proc (x) local t; int(x-t, t = 0 .. x) end proc

Now the ts are treated differently:






Austin Roche

Senior Math Developer




int(int(y, 0 <= y, x^2+y^2+z^2 <= 1));

Error, (in int) integration range or variable must be specified in the second argument, got 0 <= y

int(int(y, y = 0, x^2+y^2+z^2 = 1));

Error, (in int) integration range or variable must be specified in the second argument, got y = 0


I have been trying to solve 2D Diffusion Equation with zero Neumann BC over the unit disk. If I use Gaussian type function with a sharp peak as initial condition, I get huge errors between initial values. Let's say u(r,phi,t) is the solution of the PDE and f(r,phi) is initial value function. The expectation is for the point (r*,phi*) ,  u(r*,phi*,0)=f(r*,phi*), but it is not.

Is Numerical integration in Maple not able to handle such sharp peak? I tried some of the built-in methods such as MonteCarlo,CubaVegas but no difference.

It might be a good idea to specify some nodes arround the peak. There is a command called "peaks", but I could not use it, error message says "invalid arguments".

Thanks in advance.

I have an integral that maple can not solve but I can solve it by hand. How can I add this to maple integration database?


Please see the file below.


Many many thanks! :)

I have a complicated equation which you can find in the file below. I want to multiply both sides of equaiton by cos(beta[1,j__1]*z) and integrate from 1 to L. I have many such similar equations so I decided to write a procedure to do these staffs for me.

Can you give me simple suggestions on how to write such a procedure. The procedure will take the "equation", "multiplier" and "limits of integration" as inputs and gives the "integrated equation" as the output. Integration is perfomed by the inert function "Int".

Many thanks.

i have the following equation:

1.003225155^(l)-((&int;)[0]^1[((((0.6 r^2+1)^1.813666667)/((0.375 r^2+1)^2.666666667))^())^(l)r &DifferentialD;r)=0


and throws me the error:

Error, Got internal error in unknown : "invalid input: lhs received sattr, which is not valid for its 1st argument, expr"


do  you know the meaning of the error and why this equation cant be solved for l?


we have an exam next week and I want to know

how I can write (fordo) in maple for numerical integration

in different methods such as trapezoid , newton cotes and so on.


Please I want to know how to solve this integration.


int(exp(-(ln(y)-2*sigma^2)^2/(8*sigma^2))/(y*sqrt(8*Pi*sigma^2))*exp(-(ln(y+z)-2*sigma^2)^2/(8*sigma^2))/((y+z)*sqrt(8*Pi*sigma^2)), y = 0 .. infinity)

1 2 3 4 5 6 7 Last Page 1 of 10