Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I am generating gaussian distribution by decreasing standard deviation but the distribution generation is getting very slow.

 

GAUSSIAN.mw

A book I am reading has the following

I cannot produce this in Maple 2017. Please tell me where I go wrong. Thank


 

restart

"P(t):=(r*Q[inf])/(2+2 cosh(b-r*t))"

proc (t) options operator, arrow; r*Q[inf]/(2+2*cosh(b-r*t)) end proc

(1)

"Q(t):=(∫)[0]^(t)P(t) ⅆt"

proc (t) options operator, arrow; int(P(t), t = 0 .. t) end proc

(2)

``


 

Download Hubbert.mw

the following maple code is to solve the SYS of ODE x',y',z'

then plot z' agianst t

i got confused each plot give me zero

N:=1:M:=sqrt(N*(N+1)):N1:=1+N:w:=10:f:=1;
                             f := 1


ini1:= x(0)=0.5,y(0)=0.5,z(0)=0;
            ini1 := x(0) = 0.5, y(0) = 0.5, z(0) = 0
var:={x(t),y(t),z(t)}: 
dsys:={diff(z(t),t)=-(N1+M*cos(2*w*t))*z(t)-1+f*(x(t)+y(t)), diff(x(t),t)=-(N1-I*w-2*M*exp(-2*I*w*t))*x(t)-f*(N1+(z(t)))-2*f*M*exp(2*I*w*t),diff(y(t),t)=-(N1+I*w-2*M*exp(2*I*w*t))*y(t)-f*(N1+(z(t)))-2*f*M*exp(-2*I*w*t)}:
zd:=diff(z(t),t);
                                d      
                         zd := --- z(t)
                                dt     
res:=dsolve(dsys union {x(0)=0.5,y(0)=0.5,z(0)=0},numeric,output=listprocedure):
tit:=sprintf("F=%g,N=%g",f,N):

P1:=plots[odeplot](res,[[t,(zd)]],0..6,axes=boxed,titlefont=[SYMBOL,14],font=[1,1,18],color=blue,linestyle=1,tickmarks=[3, 4],font=[1,1,14],thickness=2,titlefont=[SYMBOL,12]);

I'm trying to plot a graph of cos(2*theta)*omega*t+2*(sin(theta))^2*sin(omega*t)=0 in Maple (For values of theta between 40 and 88 degrees roughly, with a fixed value of omega). I have substituted x=omega*t and tried to solve, but as I'm sure you can tell it is not outputting the graph I'm after, I was hoping somebody would be able to tell me where I am going wrong. Thanks.

restart;
v := 145000;
thetavn := (1/6)*Pi;
omegac := .1;
s := cos(2*thetabn)*x+2*sin(thetabn)^2*sin(x);
plots:-implicitplot(s = 0, thetabn = 43*Pi*(1/180) .. 88*Pi*(1/180), x = -200 .. 200, tickmarks = ["piticks", "decimalticks"], gridrefine = 4, size = [800, 600]);

When generating gaussian distribution I am getting the following error. Please help. Thank you

 

GAUSSIAN.mw

Is package SumTools supposed to be a superset of the sum command in Maple? Or is it supposed to be a complementary to it? When should one use SumTools vs. sum?

The help on SumTools says

The SumTools package contains commands that help find closed forms of definite and indefinite sums. The package consists of three commands and three subpackages.
 

But does not make it clear when to use it vs. sum or what is its relation to sum command.

I am asking because on one example, sum is able to give an answer, while SumTools can't. I have expected the other way, where if sum failed, then one will try SumTools.

restart;
sum(1/n*sin(n*x),n=1..infinity) assuming 0<x,x<Pi

SumTools:-IndefiniteSummation(1/n*sin(n*x),n=1..infinity) assuming 0<x, x<Pi

 

 

Hello,

I am trying to solve CVRPSD by integer L shape method. I have some problems.

d=(0, 20,20,25,15,10): Demand
p=(1,1,1/3,1/2,1/4): the probability demand

K=50
1) How to write properly Recourse Policy (Q) in maple (I attached my problem) ? Recourse (Penalty cost) is applied when the demand exceed the vehicle capacity. We know that in CVRPSD, we don't know the demand until vehicle arrive at the node(customer).
(Look at my program)

Hopefully anybody could help me to solve this.

Thank you any way.
Exact_CVRPSD.mw

Hi everyone:

I want to calculate the value of eval(diff(y, x), x = 0.418e-1)-eval(diff(y, x), x = 0.1e-1), how?

y := (1-Heaviside(x-0.10e-1))*(cos(9.0218219*x)-.99533285*sin(9.0218219*x)-.99999991*cosh(9.0218219*x)+.99533285*sinh(9.0218219*x))+(Heaviside(x-0.10e-1)-Heaviside(x-0.418e-1))*(.24369100*cos(7.7520047*x)-.36109859*sin(7.7520047*x)-.23739778*cosh(7.7520047*x)+.19615343*sinh(7.7520047*x))+Heaviside(x-0.418e-1)*(.95680995*cos(9.0218219*x)-.80884870*sin(9.0218219*x)-1.0381918*cosh(9.0218219*x)+1.1704059*sinh(9.0218219*x))

with regards...

how to submit maple job through command line. Thank you.

This should be simple but I am missing something. I want to sum the product of combinations of numbers.

I know I can assign values to a0...a[n-1]. But that isn't nice.

 

(n,k):= (5,4);
add(mul~(combinat:-choose([a(||)[](0..n-1)], k))) ; =a0*a1*a2*a3+a0*a1*a2*a4+a0*a1*a3*a4+a0*a2*a3*a4+a1*a2*a3*a4  which is correct.
add(mul~(combinat:-choose([(0..n-1)], k))) ;   #should be 24 but I get 0

 

Hello,

How I can remove this error.

also, i want to find answer via fsolve.

Error, (in fsolve) too many levels of recursion.

Thanks.

test.mw

Ok I am still not further... Lets assume wie have F_q with q=3^2 and the irreducible polynomial T^2+2T+2...
Be tau the alsias(tau=RootOf(T^2+2T+2));
Then I get in Maple the wrong (??) calculation 

(tau+1)(2tau+2)= tau+1 \neq 1, which is supposed to be the right answer: =2tau^2+4tau+2=2(tau^2+2tau+2)-2=0-2=1 because our prime number is 3... WHY does Maple not calculate that stuff correctly??

Another problem:
Be f:= x^2+tau*x;
When I enter Rem(x^q,f,x) mod 3 then Maple returns x, whereas I calculate (tau+1)x...
Where is the mistake?
I build my finite field either via firred := T^2+2*T+2; alias(tau = RootOf(firred))

 

or 
G := GF(3, 2); a := G:-extension; aOut := G:-ConvertOut(a); alias(tau = RootOf(aOut))

But both times the calculations are not correct... I dont know why? 

Please, can somebody help?

Hello,

I have another problem and maybe someone can help me.
When I enter the code: 

with  alias(tau=RootOf(T^2+2T+2)) ;
then Maple gives me the output false???
Why is it false??
Can someone help me?
How do I tell Maple that for example f:= x^2+tau*x is a Polynom with x=variable, tau= RootOf?
Thank you!!

Some definition of n! where n are the negative integers is taken to be infinity. (this is Gamma function for negative integers).

https://en.wikipedia.org/wiki/Gamma_function

So 1/(-1)!  should be zero. And that is what Mathematica gives

But Maple does not like (-1)!, it gives division by zero, I assume because it is not using the above definition using Gamma function.  But then how come Maple is able to find correctly this sum

sum(1/factorial(n-1),n=0..infinity)

Which is exp(1).   The first term above, when n=0 is   1/(-1)!  which Maple does not like. Because if we take the first term as 1/infinity=0 then the sum is the same as if we had

sum(1/factorial(n-1),n=1..infinity)

And now it is exp(1) with no problem dealing with negative integer factorial.

Question is: Since Maple does not like negative integer factorial, how comes it accepted the above sum, whose first term contain negative integer factorial? 

Just wondering how it did the above, that is all. When I solved this by hand, I used 1/(-1)! = 0 to be able to sum it.

First 714 715 716 717 718 719 720 Last Page 716 of 2218