MaplePrimes Questions

It seems that simplify uses some transformations that aren't generically valid, and evalf relies on those transformations too:

 

nint := (fz, zrng) -> evalf(add(
  int(fz, op(1, zrng) = op([2, i], zrng) .. op([2, i+1], zrng)),
  i = 1 .. nops(op(2, zrng))-1));
f1 := z -> MeijerG([[1/2], []], [[], []], z);

simplify(f1(z));
                       sqrt(1/z) exp(-1/z)

evalf(f1(-1));
                              -9                
               -1.672586379 10   + 2.718281828 I

f1(-1.);
                              -9                
               -1.672586379 10   - 2.718281828 I

nint(GAMMA(1/2+y)*(-1)^y, y = [-infinity-I, -I, I, -infinity+I])/(2*Pi*I);
                             -11                
               6.652676619 10    - 2.718281828 I

So it seems that evalf uses the simplified form, but that form doesn't agree with the definition of MeijerG for negative z. The form that does would be 1/sqrt(z)*exp(-1/z).

 

f2 := z -> MeijerG([[], [1]], [[0, 2], []], z);

simplify(f2(z));
                    exp(-z) z + exp(-z) - 1

evalf(f2(1));
                         -0.2642411177

f2(1.);
                          0.7357588823

nint(GAMMA(-y)*GAMMA(2-y)/GAMMA(1-y), y = [infinity-I, -1-I, -1+I, infinity+I])/(2*Pi*I);
                      0.7357588823 - 0. I

The result of simplify is off by -1. Just evaluating f2(1) doesn't use that transformation rule, but evalf apparently does.

 

Hello everybody.

I'd like to share an observation about the integration of the Jacobi elliptic functions, in particularly the elliptic sine sn(x,k).

It's correct answer. But when I make the integration of the expression

 

according to the Handbook of Elliptic Integrals for Engineers and Scientists we have slightly another result

What is the difference?

when use cmaple and print command to show result in text file, it use multiple line to express

but not maple command

how to print the maple command instead of multiple line expression when use cmaple

series(1/(1-x), x=0);
can be express as sum(x^y,y=0..infinity)
 
series(tanh(x), x=0);
how to express tanh(x) and tanh(x+1)?
 
is there any function and procedure to generate x^y these kind of result?

g2 := arctanh((exp(2*y)+sqrt((exp(2*y))^2+exp(2*y)))/exp(2*y)-1)-1;
singular(g2);
FunctionAdvisor(definition, g2);
plot(g2, y=-5..5);
 

Hello,

I would like to build a Maple call, whereby 5x^3+7x^2+2x^3 is somehow exported to latex without collecting like terms.

I cannot seem to get it to work.

any help would be much appreciated.

 

Thanks,

Mark

 

Numeric.mw

Is there an iterative solver for numeric equations. I'm trying to solve for Iarc & Rarc knowing C and Z1, Z1 can be complex.

Dears,

I have seen a Mathematica code which I would like to have it in Maple, since I do not know that program. Let f(z) an analytic function, say f(z):=1+2^{z+1}+3^{z}. To find the roots of f(z) in a regingion, we can use in Maple the command "Analytic" (of the package "RootFinding"). However, in Mathematica is used the following:

L = 20; Monitor[zeros = Flatten@Table[N[z /. Solve[f[z] ⩵ 0 && k L ≤ Re[z] ≤ k L + L && -10 < Im[z] < 10, z], 25],{k, 300}],k];

What means the "N[z/. Solve..." instruction? Also, the following command:

SortBy[zeros, Re]; 

Can be "translated" to Maple?

 

Many thaks in advance for your comments!

With Regards,

G.

I run two small computations to test the improvement that should occur when using several cores (8 cores in my computer):

N:=100000.:

st:=time():

w:=seq(sqrt(i),i=1. ..N):

time()-st;

and:

with(Threads):

st:=time():

w:=Seq(sqrt(i),i=1. .. N):

time()-st;

And the results are: 23.6 sec with seq, and 118.4 sec with Seq!

Seriously?

How can these results be explained?

Thank you in advance

 

I do long "for loops" which perform the same procedure with different inputs and collect the outputs in a vector. In Matlab I use the command "parfor" to accelerate the calculations.

What is the equivalent of "parfor" in Maple? 

An example would be useful.

 

Thank You

hey everyone
i got a little problem here i really dont get it why my fsolve give me this error

Error, (in sqrfree) argument must be a polynomial or a rational function in {cf[-2], cf[-1], cf[0], cf[1]}
these are my variables :


cf[-2], cf[-1], cf[0], cf[1]}


thats part of my code :

res1;
(34.30563197 cf[-1] - 10.13498047 cf[0] + 5.197134649 cf[1]

   - 0.4714805434) (0.3095515346 cf[-2] + 0.3822521253) - (cf[-1](2.466022067

  ) + cf[0](-0.6605923783) + cf[1](1.076415647))^2

   - cf[-1](2.466022067) - cf[0](-0.6605923783)

   - cf[1](1.076415647) - 333.1166471 cf[-1] + 186.8672744 cf[0]

   - 128.6145289 cf[1] + 0.8737683108, (-39.73727883 cf[-1]

   + 26.25682759 cf[0] - 7.289811219 cf[1] - 0.3506934780)

  (0.4161980514 cf[-1] + 0.4402863507) - (cf[-1](0.3227083347)

   + cf[0](2.517826949) + cf[1](-0.7889944208))^2

   - cf[-1](0.3227083347) - cf[0](2.517826949)

   - cf[1](-0.7889944208) - 15.03436409 cf[-1]

   - 129.5665191 cf[0] + 68.25827819 cf[1] + 0.5888637790,

  (17.36111111 cf[-1] - 29.80788311 cf[0] + 17.36111111 cf[1]

   - 0.2500000000) (0.5000000000 cf[0] + 0.5000000000)

                                                            2
   - (cf[-1](-1.833333334) + cf[0](0.) + cf[1](2.333333334))

   - cf[-1](-1.833333334) - cf[0](0.) - cf[1](2.333333334)

   + 38.17276297 cf[-1] + 34.00261850 cf[0] - 77.23526300 cf[1]

   + 0.3750000000, (-3.548332053 cf[-1] + 12.78057007 cf[0]

   - 19.34221012 cf[1] - 0.1707008416) (0.5290914191 cf[1]

   + 0.5597136492) - (cf[-1](1.060931345) + cf[0](-1.540306477)

   + cf[1](-0.2297630675))^2 - cf[-1](1.060931345)

   - cf[0](-1.540306477) - cf[1](-0.2297630675)

   - 20.59209188 cf[-1] + 28.27859544 cf[0] + 40.45630289 cf[1]

         -10                      
   + 1 10    cf[-2] + 0.2254717519


fsolve({seq(res1[v] = 0, v = 1 .. 2*N+2)})     ( N here is 1 )

why i cant get the awenser and if you can plz solve it for me

i would be happy that anyone can give me an explanation with details

tnX a lot

Arian
 

 

I'm trying to figure out how to plot the following: if I have a region G in R^2, and two functions f <= g on G, I would like to plot the projection on the XY-plane in say one colour and the volume between f and g in another. For example, consider G the region between the parabolae y=x^2 and y=2-x^2, and f(x,y) = x+y+4 and g(x,y) = 25-x^2-y^2, just to name something. I'd also prefer the plot to be easy adaptable to other functions, e.g. with a different region G, different function descriptions for f and g but also, if possible, projection on one of the other two coordinate planes. Is there an easy way to do this?

I wonder - would it be possible to automate the following way of adding a legend to plots? If so - how?

plot([f(x), g(x), 7], legend = ['f(x)' = f(x), 'g(x)' = g(x), y = 7]);


In my opinion such a legend makes the plot much more readable - but most students (and others) will usually be too lazy to type this out, hence the wish for it be to automated.

Any help will be much appreciated.

Hello,

I would like to ask you for a help with solving a differencial equations for oscillator damped by a constant friction force (no damping force proportional to the velocity!)

General solultion:

Where 

The amplituce A is decreasing by C at each turning point and center of the ascillatory motion moves: x = -C/2 or x = C/2

Moving:

where

How to create a graphic output of movement according to equation x(t) similar to graph mentioned below?

Thank a lot for your help. I have been working on this task for several weeks without success.

Tom

Hi,

Although i can evaluate speed, displacement and accelleration, i can't plot these functions.

The error message is:

What am i doing wrong in my definitions?

Thank you in advance.


 

"with(Units[Simple]):"

v := proc (t) options operator, arrow; Units:-Simple:-`*`(Units:-Simple:-`*`(Units:-Simple:-tanh(Units:-Simple:-`*`(Units:-Simple:-`+`(Units:-Simple:-`*`(Units:-Simple:-`*`(t, Units:-Simple:-sqrt(F)), Units:-Simple:-sqrt(c)), Units:-Simple:-`*`(Units:-Simple:-arctanh(Units:-Simple:-`*`(Units:-Simple:-`*`(v__0, Units:-Simple:-sqrt(c)), Units:-Simple:-`/`(Units:-Simple:-sqrt(F)))), m__0)), Units:-Simple:-`/`(m__0))), Units:-Simple:-sqrt(F)), Units:-Simple:-`/`(Units:-Simple:-sqrt(c))) end proc:

NULL

NULL

NULL

F := 2800.0*Unit('N')

 

c := .7*Unit('kg'/'m') 

 

m__0 := 1400*Unit('kg') 

NULL

v__0 := 10*Unit('m'/'s')

v__e := v(120*Unit('s')) 

t__0 := 0*Unit('s')

``

``

v__e = 63.19906538*Units:-Unit(m/s)"(->)"63.199*Units:-Unit(m/s)

NULL

``

a := proc (t) options operator, arrow; Units:-Simple:-`*`(Units:-Simple:-`*`(F, Units:-Simple:-`+`(1, Units:-Simple:-`-`(Units:-Simple:-`^`(Units:-Simple:-tanh(Units:-Simple:-`*`(Units:-Simple:-`+`(Units:-Simple:-`*`(Units:-Simple:-`*`(t, Units:-Simple:-sqrt(F)), Units:-Simple:-sqrt(c)), Units:-Simple:-`*`(Units:-Simple:-arctanh(Units:-Simple:-`*`(Units:-Simple:-`*`(v__0, Units:-Simple:-sqrt(c)), Units:-Simple:-`/`(Units:-Simple:-sqrt(F)))), m__0)), Units:-Simple:-`/`(m__0))), 2)))), Units:-Simple:-`/`(m__0)) end proc:

NULL

a__e := a(120*Unit('s'))

NULL

a__e = 0.2939066600e-2*Units:-Unit(m/s^2)"(->)"0.29391e-2*Units:-Unit(m/s^2)

``

"`s__a`(t):=(&int;)[`t__0`]^t(tanh((tau sqrt(F) sqrt(c)+arctanh((`v__0` sqrt(c))/(sqrt(F))) `m__0`)/`m__0`) sqrt(F))/(sqrt(c)) &DifferentialD;tau:"

NULL

s__e := s__a(120*Unit('s'))

NULL

s__e = 6497.492630*Units:-Unit(m)"(->)"6497.5*Units:-Unit(m)

NULLNULL

 

v(2*Unit('s')) = 13.85629668*Units:-Unit(m/s)"(->)"13.856*Units:-Unit(m/s)

NULL

NULL

"Z(t):=[[[`s__a`(t)],[v(t)],[a(t)]]]:"

NULL

Vektor für Weg, Geschwindigkeit und Beschleunigung:

``

Z(120*Unit('s')) = Matrix(%id = 4626704194)NULL

NULL

NULL

v(t)"->"

NULL

NULL

NULL

NULL

NULL

NULL

NULL

``

NULL

NULL


 

Download Berechnungen.mw

First 938 939 940 941 942 943 944 Last Page 940 of 2428