Items tagged with integral integral Tagged Items Feed

How to calculate the integral

(symbolically or/and numerically) with Maple?

 

I would like to pay attention to an article " Sums and Integrals: The Swiss analysis knife " by Bill Casselman, where the Euler-Maclaurin formula is discussed.  It should be noted all that matter is implemented in Maple through the commands bernoulli and eulermac. For example,

bernoulli(666);


eulermac(1/x, x);

,

eulermac(sin(x), x, 6);

BTW, as far as I know it, this boring stuff is substantially used in modern physics. The one is considered in

Ronald Graham, Donald E. Knuth, and Oren Patashnik, Concrete mathematics, Addison-Wesley, 1989.

The last chapter is concerned with the Euler-MacLaurin formula.


           

Hi everyone,

I have a great problem with the evaluation of following definite integral

> restart;

> int((t-x)^2)/(1+2t+(1/2)t^2-ln(t^2+2t+2)t-ln(t^2+2t+2)+arctan(1+t)t^2+2arctan(1+t)t+ln(2)t+ln(2)-(pi/4)t^2-(pi/2)t)^2,t=0..x)

I have tried different classical commands but Maple doesn't give an answer. Probably, it's just a silly fault.

Does anyone knows how to solve it?

Thanks.

Hi all,

 

I wonder if any of you guys can figure out why this integral is taking more than 2 hours to return a result??

I had similar problems in the past that were fixed creating a procedure, changing the solver and in case of trigonometric functions, changing the argument from float to rational number. 

Here it goes:Meijer_question.mw

restart

 

``

 

ms := (1.141448075+9.645873109*10^(-11)*I)*(MeijerG([[], []], [[1/4, 1/4], [1/2, 0]], .3956862293*(-.70*x+1)^4)+(2.148399968-2.148399963*I)*MeijerG([[], []], [[1/4], [1/2, 1/4, 0]], -.3956862293*(-.70*x+1)^4)+(-12.48809431-3.188863063*10^(-9)*I)*MeijerG([[], []], [[0], [1/2, 1/4, 1/4]], -.3956862293*(-.70*x+1)^4)+(4.061500400*10^(-10)-8.649913391*I)*MeijerG([[], []], [[1/2], [1/4, 1/4, 0]], -.3956862293*(-.70*x+1)^4));

b := .7;

``

NULL

"H3p:=proc(ms,b) local Hcub;  Hcub := evalf(Int(diff((diff(ms, x))*(int((-x*b+1)*(int((ms')^2, x = 0 .. x)), x = 1 .. x)), x)*ms, x=0..1,method = _d01ajc)): return Hcub; end proc:   "

``

 

st := time(); ``*H3p(ms, b); time()-st

``


Thanks!

Download Meijer_question.mw

Hi, I'm currently from Mathematica and it starts to disappouint me because it cannot do what I can.

Can somebody try to calculate undefinite integral in Maple for x variable. a and b are parameters.

exp(a*x+b*x2)*erf(x)2

If Maple can do that then I would switch to Maple comunity.

Thanks,

Tim

Int(ln(1+sqrt((x+1)/x)),x);

value(%);

 

Does not work.

 

Int(ln(2+sqrt((x+1)/x)),x);
value(%);

Works.

 

But with some effect,

 

 

Could this possibly be improved in the next release?

 

I want to solve the int((y4+by2+c)-1/2,y)-x and find y=h(x), where b and c are constants s.t. c>b2/4. Maple gives me complex Jacobi elliptic function as a result. But I am not sure that this integral has complex value. Am I doing something wrong or the result is really a complex valued function? Thanks.

Indeed my main question is: Plot y=y(u) where we have these two relations: int((y4+by2+c)-1/2,y)=x and find y=h(x). Then evaluate int((h(x)-B)-1/2,x)=u and find x=g(u). By using these relations plot y=y(u). :)

Here B is an arbitrary constant, but if necessary we can define a value for it. All the variables and constants are real.

I hope I manage to express myself. Thanks again.

 

Int(piecewise(t < T1, exp((1/2)*t*(1+2*I-I*sqrt(3))), t < T2, -1000*exp((1/2)*t*(1+2*I-I*sqrt(3)))*(-1/1000+T1-t), T2 <= t, -1000*exp((1/2)*t*(1+2*I-I*sqrt(3)))*(-1/1000-T2+T1)), t)

 

 

Let us consider the definite integral

J:=int(abs(x-(-x^5+1)^(1/5)), x = 0 .. 1);

Maple fails with it, Mathematica 10.1 finds it in terms of  special functions. Let us look at the integrand:
plot(x-(-x^5+1)^(1/5), x = 0 .. 1);

We see the expression under the modulus changes its sign at the unique point of RealRange(0,1). Therefore

solve(x-(-x^5+1)^(1/5));


Then

J:= int(-x+(-x^5+1)^(1/5), x = 0 .. (1/2)*2^(4/5))+int(x-(-x^5+1)^(1/5), x = (1/2)*2^(4/5) .. 1);

which outputs a complicated expression

(1/8)*2^(4/5)*(4*hypergeom([-1/5, 1/5], [6/5], 1/2)-2^(4/5))+(1/2)*2^(4/5)*((1/2)*2^(1/5)-(1/4)*2^(4/5))-(1/25)*Pi*csc((1/5)*Pi)*(-(25/2)*sin((1/5)*Pi)*GAMMA(4/5)*2^(4/5)*hypergeom([-1/5, 1/5], [6/5], 1/2)/Pi+(5/4)*sec((3/10)*Pi)*cos((1/10)*Pi)*2^(3/5)*Pi^(1/2)*csc((3/10)*Pi)/GAMMA(7/10))/GAMMA(4/5).

At the same time we have

int(abs(x-(-x^5+1)^(1/5)), x = 0 .. 1, numeric);

                          0.5000000000

How to obtain 1/2 symbolically?






according to help on timelimit

"Note: For efficiency reasons, the timelimit bound is ignored while in built-in routines."

Which is not very useful, since I want to limit  int() to some CPU time.

There are some integrals that can hang Maple easily. I'd like to set some CPU time on an int() and
have it terminate with error, but I am not able to find how to do that.

For example this

int((a+a*sin(f*x+e))^(1/2)*(c+d*sin(f*x+e))^(5/2),x)

Will hangs Maple.
Is there a trick some expert here can show to limit the CPU time on a build in operation?
May be some package or other command can do this?

I am only interested in int() now, but if it can work also on dsolve, that will be good.

thank you
ps. Mathematica supports putting time constraint on build-in commands. So I do
not see why Maple can't also do the same.

of the cut-off sphere

Изображение

Изображение?

Of course, with Maple.

Any suggestions (or perhaps related examples?) illustrating how I might numerically solve for f(t) in the following non-linear integral equation?  In Fortran, I would start with a guess f(t)=T0, and then search in the neighborhood for a minimum (in the error), but I am not familiar with numerical searches and methods in Maple.  Thank you for any suggestions or leads.

(a,b,... etc are all real)


T__0 := 298.

`&Delta;T` := 25.

0 < beta and beta <= 1

``

f*t = T[0]+`&Delta;T`*[1-exp(-a(int(exp(-b/f(y)), y = y[1] .. t))^beta)]

NULL


Download Integraleqn.mw

 

 

 

I use Maple 15 to calculate some (nasty) integrals at my university. Because our university also offers a server on which I can run my Maple program, I would like to do that. (instead of occupying a workspace). But at the computer on my workspace the integrals are evaluated fine, but on the server the integrals are just returned with no numerical evaluation.

I constructed a MWE to look where it goes wrong. I set the printlevel to 25 so I could see what was going on. The MWE was suprisingly simple, on both machines (via ssh) I executed within maple:

evalf(Int(1/sqrt(x), x=0..2))

This of course would normally just give 2*sqrt(2). On my workplace-pc it worked fine and it found 2.828427125. The server just returned the integral. After looking at the steps, they where both exactly the same until the following part:

Workplace-PC:

         General_flags := {_NoNAG, _DEFAULT, _NoMultiple}

            NAG_methods := {_d01ajc, _d01akc, _d01amc}

                        Method := _DEFAULT

                          HFDigits := 15

                                       -12
                        HFeps := 0.1 10

                                            -9
                    HFeps := 0.5000000000 10

   oldEvents := overflow = default, division_by_zero = default

                         callNAG := true

                            fcns := {}

                  result := 2.82842712474618807

Server:

        General_flags := {_NoNAG, _DEFAULT, _NoMultiple}

           NAG_methods := {_d01ajc, _d01akc, _d01amc}

                       Method := _DEFAULT

                         HFDigits := 15

                                      -12
                       HFeps := 0.1 10

                                           -9
                   HFeps := 0.5000000000 10

   oldEvents := overflow = default, division_by_zero = default

                         callNAG := true

                           fcns := {}

       overflow = exception, division_by_zero = exception

It seems that the server has a problem with the singularity and thus throwing an exception, but I just don't get why. The Maple-versions are both the same.

Does somebody know what this could be?

Dear community,

The VectorCalculus package in Maple 18 exhibits some rather odd behaviour when calculating an integral over a 3D-domain (an elipsoid centered at (0,0,1) with length of semi-axes 2, 2, and 1) given by a 'Region'. It also reports an incorrect result when calculating the flux of a vector field through the surface of this ellipsoid.

See below for a minimal working example:

 

// integrate several functions over ellipsoid

int(2*x+2*y, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: 0

int(2*z, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: 32*Pi/3

int(2*x+2*y+2*z, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: -32*Pi/3

 

Why does the integral change sign?

 

// Calculate flux of vector field over surface of ellipsoid

F2 := VectorField(`<,>`(x^2, y^2, z^2));

S2 := Surface(`<,>`(2*sin(t)*cos(s), 2*sin(t)*sin(s), 1+cos(t)), s = 0 .. 2*Pi, t = 0 .. Pi);

Flux(F2, S2, 'outward');   ---- output: -32*Pi/3

 

However, since 'z' is positive over the entire ellipsoid, by the Divergence Theorem we know the result should be positive (in fact, equal to +32*Pi/3). Changing 'outward' to 'inward' does not change the sign, by the way.

 

Is this a bug inside the VectorCalculus package which appears more often, or have I done something wrong?

Thank you for responding and apologies if a similar question has already been answered in another thread.

Best wishes,

QQ

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