MaplePrimes Questions

The context.

I have to numerically integrate a complicated function over a wide x domain: int( f(x), x=0..2e8). Because of the characteristic of the function, to get accurate results, I must separate thi x domain in about 5000 sub-intervals. With a do loop doing 5000 iterations I apply the 'int" commant 5000 times and I add the results. In fact, in the do loop I use this specific command:

evalf(Int(fct(k0), k0 = j*interv .. (j+1)*interv, method = _Gquad, 'epsilon' = 1e-3))

The value of interv is 30000 and j goes from 0 to about 5327 by 1.

 

The problem.

At the beginning of the computation (for small values of j) the time needed to Maple to perform one loop is about 3.5 seconds. The problem is that loop after loop, this time always increase from 3.5 seconds up to 600 or 800 or even 1000 seconds. It then becomes prohibitive. (I have many of these computations to perform. It is a heavy computation that would need about 6 hours at 3.5 seconds per cycle. I let my computer work overnight. But at 800 seconds per cycle it would need weeks).

 

More information.

Sometimes, without any visible reasons, this time decreases back to 5 or 6 seconds per cycle and re-increases again. One can think that it depends on the local characteristics of the function, but if I stop the computation at any point (particularly when the time per cycle is large), re-insert the results already obtained at this point and restart the computations at this point, the time per cycle goes back to about 3.5 seconds and slowly increases again. It is like garbage accumulates somewhere and slows down Maple. When I stop Maple and restart it "flushes" this garbage.

 

I tried.

I have searched the net, MaplePrimes, Maple help… to solve it. I tried the command gc() even if it is not recommanded with no results. I use a MacBookPro i7 quad core 3.3 GHz with 16 Gig of RAM.

These computations use at most 1 or 2 Gig. When I do the command kernelopts(datalimit) I get infinity as the result. Then I presume that Maple have access to the full 16Gig of RAM (minus what is needed bye the system). (The same problem appears on different machines, Windows or Mac).

 

My question is very simple. What causes this problem and how can I solve it?

(Yes I could switch to a pure numerical computations software (C, fortran, MatLab…) but for some reasons I have to do that with Maple.) I have been a Maple user for about 30 years and never had that kind of problem.

 

Thank you very much.

Normand Beaudoin, Dept. of physics &astronomy. University of Moncton.

Dear Sirs, 

 

Can someone explain to why if I load Real Domain, that the derivate of a function at certain value comes out like in screendump? 

Thanks in advance :)  

https://imgur.com/a/sHJEj

Fred

 

I have this set of four equations and five constants, how I will shoot for x5 to find the unique solution

I assumme x5= pi/2 as initial guess but no solution

any body can help?

I am writing a textbook in biomedical engineering and using Maple 14 for generating figures.  In many of the graphs, my axis labels have subscripts or superscripts.  For example in a 2D plot statement I type   labels=[x,f[0](x)] which gives a subscript 0.   However, both x and f0(x) appear in italics.  How can I have them appear as normal...i.e. without italics? The labelfont command does not seem to have an instruction to remove the italics.  Can you assist me?

I would like to solve {x^2+y^2+z^2 = 3, x+y+z = 3} over the reals. Clearly x=1,y=1,z=1 is a solution.

Maple seems to have a hard time with this. I have tried using with(RealDomain) and various commands.

The last solution  is getting closer to the real number answer if i substitute z = 1, but then i get the strange answer { 1=1, x=1,y=1}

I tried using wolfram and it showed me the correct answer.

Rest assured, I am a strong maple fan. I sometimes use wolfram for quick and dirty solutions.

Also is there a way to turn off "with(RealDomain)", switch back to the default domain, without using 'restart'. 

Is there any way i can define a value to a variable together with an angle? 

I am looking to do something like this:



the example is from Mathcad, but i was hoping there was some way to do it in Maple also?

I want to write a code for solving following PDE with Cauchy data.
Equation:  (y-u(x,y))*(diff(u(x,y), x))+(u(x,y)-x)*(diff(u(x, y), y)) =x-y
Cauchy Data: u(x,y)=0 on xy=1.
THE CODE:
restart;
PDE := (y-u(x,y))*(diff(u(x,y), x))+(u(x,y)-x)*(diff(u(x, y), y)) =x-y;ic:=u(x, 1/x)=0;
ans := pdsolve({PDE,ic});
pdetest(ans, PDE);

Maple doesn' t give a solution.Why?

"Error, (in PDEtools:-Library:-NormalizeBoundaryConditions) unexpected occurrence of the variables {x} in the 2nd operand of u(x, 1/x) in the given initial conditions"

I

How to get the number of parameters of an operator/procedure? Like this.

How do I move a circle around a sphere?

See attached:  WA61_circle_sphere_post.mw

Circle shares surface area of sphere, how can circle be moved independently around sphere?

I would like to retain the patchwork of the sphere to resemble latitude/longitude lines.

Thanks in advance

Les

I am using the LinearAlgebra package to do dynamics between a rotating Cartesian coordinate system and a fixed Cartesian coordinate system. The VectorCalculus package is not what I need. 

Since I can't seem to get my test worksheet to paste into this post, I will manually enter an "approximation" to it. I assume that the notation [x, y, z] represents a column vector. I also assume that x represents the cross product operator from the operator pallete. 

I just want to get any one of the three ways of doing a vector cross product (see below) to simply display in math notation as R x V. What I get from the three methods below for an unevaluated cross product is "ugly".

Any help or advice will be greatly appreciated.

> restart

> with(LinearAlgebra):

> R := Vector(3, [x, y, z])

                                                 R := [x, y, z]

> V := Vector(3, [u, v, w])

                                                 V := [u, v, w]

>R x V

                                                [-vz + wy, uz - wx, -uy + vx]

>'R x V'

                                               Typesetting:-delayCrossProduct(R,V)

>CrossProduct(R, V)

                                               [-vz + wy, uz - wx, -uy + vx]

>'CrossProduct(R,V)'

                                               LinearAlgebra:-CrossProduct(R,V)

> R &x V

                                               [-vz + wy, uz - wx, -uy + vx]

'R &x V'

                                               LinearAlgebra:-&x(R,V)

Can any one disprove maple answer in the attached document?
If not, what is the conclusion?
 

restart

coulditbe(3*I > 0)

false

(1)

coulditbe(3*I > 0)

false

(2)

coulditbe(3*I < 0)

false

(3)

coulditbe(-2+3*I = 0)

false

(4)

coulditbe(abs(I) > 0)

true

(5)

true

(6)

coulditbe(2+3*I < 0)

true

(7)

``

``

What is your opinion?

My opinion from the above is : When a is real and b is complex, a and b can not be compared.

Like number of goats and number of lions  can not be added to give an answer in number of lions alone or number of goats alone!!
Riemann's function Zeta is a function of Complex number

 

solve(abs(Zeta(s+2*I)) = 0, s)

-2*I+RootOf(Zeta(_Z))

(8)

"(->)"

-2.0000-2.*I

(9)

NULL

solve(Zeta(s+2*I) = 0, s)

-2*I+RootOf(Zeta(_Z))

(10)

"(->)"

-2.0000-2.*I

(11)

What does the above results convey??

Am I correct if i state that 's' should be a complex number only and not a real number.


 

Download s_is_complex.mw

s_is_complex.mw

Is there any way to solve sin(x)=0 with solutions x=k*pi in Maple?

Many thanks!

Hey, guys. Can you help me one more time about the non-homogeneous differential equation, the function is shown below:

ODE:

y''(x)-0.00003019*y(x)^0.337=[9.542*10^(-13)]*x  ;    0<=x<=2945

BCs:

y(0)=0; y'(2945)=0; 

Actually, the right part is applied bending moment due to own weight. it is very small, but I don't think I may neglect it.  The exact solution is the best answer for me, the numerical solution is also available for me.  Can you show your code of Maple? Thank you for your any help in advance.   Sincerely, I appreciate it so so so much!!!

I use the convert(real_number, string) Maple 18 function and get the following :


tmp:=convert(0.0141,string); # I get ".141e-1"  What I really want is : "0.0141"

Is there any other way to convert a real number and leave it in its original form ?

Thanks.

I have a expression with polylog functions.I want to simplifying to Pi's constans.I tired with:

1. simplify
2. convert

but seems dosen't work:

simplify(sum((sin(k)/k)^7, k = 0 .. infinity))

#1+(1/128*I)*polylog(7, exp(7*I))-(7/128*I)*polylog(7, exp(5*I))+(21/128*I)*polylog(7, exp(3*I))-
(35/128*I)*polylog(7, exp(I))+(35/128*I)*polylog(7, exp(-I))-(21/128*I)*polylog(7, exp(-3*I))+
(7/128*I)*polylog(7, exp(-5*I))-(1/128*I)*polylog(7, exp(-7*I))

 Mathematica give me:

How to do it in Maple?

First 928 929 930 931 932 933 934 Last Page 930 of 2434