Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi i wanted to see how this function is generated so i entered:

numtheory:-ithrational := proc(i::nonnegint)
   1   if i = 0 then
   2     return 0
       end if;
   3   return numtheory:-ithratB(i-1)/numtheory:-ithratB(i)
end proc

showstat(ithratb)  returns the error that this function is not in the number theory package, which is the complete opposite of what is implied by the above.

I have the following equation:

eqn := m*`ℓ`^2*(diff(q[1](t), t, t))+k[t]*`ℓ`^2*q[1]+5*k[r]*q[1]-4*k[r]*q[2]+k[r]*q[3]-5*P*`ℓ`*q[1]+2*`ℓ`*P*q[2]+2*`ℓ`*T*q[1]-`ℓ`*T*q[2] = 0;

And I want to execute the following substitutions:

k[r]/(k[t]*`ℓ`^2) = alpha;
P/(k[t]*`ℓ`) = sigma
T/(k[t]*`ℓ`) = theta

For that, I have tried:

expand(eqn/(k[t]*`ℓ`^2));
eqn1:= algsubs({k[r]/(k[t]*`ℓ`^2) = alpha, P/(k[t]*`ℓ`) = sigma, T/(k[t]*`ℓ`) = theta}, %);

And:

eqn1:= algsubs(k[r]/(k[t]*`ℓ`^2) = alpha, %);
eqn2:= algsubs(P/(k[t]*`ℓ`) = sigma, %);
eqn3:= algsubs(T/(k[t]*`ℓ`) = theta, %);

But none of these have worked. Does anyone know how to solve this?

Thanks in advance.

Can we use this euler lagrange command for the system of pde's?

If we have a system without lagrangian then euler opertor is applied corresponding to three dependent variables.

so we have three equations but in this euler lagrange command no dependent variable is mentioned.   

I have a code that is built on a module which in turn contains records, procs etc. to model certain electronic devices.

The main program first instantiates the various circuits I am using. These are mostly Maple records. It then enters a loop that iterates over a number of cycles this system executes in order to build up statistics.

My problem is that somewhere the code has a memory leak, and Maple eats up rather vast amounts of memory, that increase with the number of cycles in the loop. I suspect that some of the methods I am calling allocate a new instance on each cycle, which is not the intended behaviour. What I am looking for is a way to diagnose e.g. which record, or which proc, gets allocated anew every time. I know about usage but that prints out only the amount of memory allocated; that does not help; I know the number is large. I am looking for a tool that e.g. tells me that record xx is allocated 1000 times etc.

Thanks,

M.D.

Dear users! I want to define y-axes like Re^(1/2)*C[f] in the following expression

restart; plot([sin, cos], -Pi .. Pi, title = "Simple Trig Functions", legend = ["Sine Plot", "Cosine Plot"], titlefont = ["ARIAL", 15], labels = ["x values", typeset("Re", C__f)], labeldirections = ["horizontal", "vertical"], labelfont = ["HELVETICA", 16], linestyle = [solid, longdash], axesfont = ["HELVETICA", "ROMAN", 16], legendstyle = [font = ["HELVETICA", 9], location = right], tickmarks = [[-Pi = -180^o, -2*Pi*(1/3) = -120^o, -(1/3)*Pi = -60^o, 0 = `0`^o, (1/3)*Pi = 60^o, 2*Pi*(1/3) = 120^o, Pi = 180^o], default]);

I have noticed that sometimes maple decides to spontaeous stop writing particular symbols in itallic or begin doing so for numerical symbols.

 

How can i stop this before I hurt my computer? I've just put up with it for around 2 years now and it's getting pretty close to danger zone material.

 

And sometimes the font colour changes from black to red, and its not in a block, and no i am not pressing anything or anything. It's like someone is intentionally trying to make things hard for me to not get angry in a really subtle way which i can totally appreciate the art of but like, ok it's obviously a bug in the software so if someone can run me through where to download a patch or whatever so this doesnt escalate to the point of concern about skynet initiating mutually assured destruction id really appreciate it.

like just now a particular bullet point i mada was in red where as all the others remain black as per the settings, so yeah laugh all you want it's just a slight uncomfortable feeling if i were to low ball it

Hi All,

I need to generate WienerProcess(), but I want to get result as function Z(t).

Then I want to use this function in solving ODE. How is it possible to do?

I have a spike train which is a series of time points, for example saved as a vector of floats. Could someone tell me how I can plot this spike train as a series of vertical bars at each of these time points ?

I would also like to know how to plot a series of spike trains one above the other[i.e. the raster plot] if I start with a 2-D matrix of floats where each row correspond to one spike train.

Thanks in advance.

  

I am trying to solve a factorial inequality.

solve(1/(n+1)! * exp(0.1)<=0.00001)

I get no result and a warning, "some solutions may have been lost".

Also same problem with the simpler inequality

solve(1/(n+1)! <=0.00001)

Wolfram has no problem solving it.

Am I entering it wrong? I attached a copy of my worksheet.

factorialinequality.mw

 

The problem came up when solving this problem: What degree of the maclaurin polynomial  is required so that the error in the approximation of e0.1 is less than 0.00001

When I right-click on a Matrix, the cursor rotates, but the context menu does not open at all (in Maple 2017, in document mode, in Win 10).
Any suggestions - Anyone else with this problem?

Hi all,

I have an differential equation in terms of the D-operator and am trying to convert it to diff form. Using convert/Diff works fine as long as partially evaluated functions don't appear in the equation. However, I can't figure out how to get the two to cooperate.

For instance, running

D[2](eta)(t,x)+D[2](phi)(t,x,0)+D[2](phi)(t,x,0):
convert(%, Diff);

returns

D[2](eta)(t,x) + Diff(phi(t,x,0),x)

Why is the eta term not converted to diff(eta(t,x),x)?

Thanks a lot!

Hello everyone!

Please help me to resolve following error appeared in PDEs.

I have following system of partial differential equation and tried to solve with numerical method

pde1:=diff(U, t)-(diff(U, x, x))-2*U*(diff(U, x))+diff(U*V, x)

> pde2 := diff(V, t)-(diff(V, x, x))-2*V*(diff(V, x))+diff(U*V, x);
> ics := { U(x, 0) = sin(x),  V(x, 0) = sin(x)};

sol:=pdsolve(pde1,pde2,ics,numeric,time=t, range=1..20)

I am get following error

Error, (in pdsolve) invalid input: `pdsolve/numeric` expects its 2nd argument, IBCs, to be of type {set, list}, but received 0
 

Now, I'm not the professional here, you guys are, since this is how the software has been built to produce this code automatically as i can only assume to be educational purposes for the user, concerning the analytic extension of the factorial on C, the gamma function. 

I feel that doing this is in no way helping or promoting your product, clearly despite the idea indeed having merit, it is not applicable to the extent it has been written into your convert function, and look, show me the mathematics of why it makes sense to have things designed this way. 

 

I am not saying i know anything important or am trying to be insulting, I just feel like this is some kind of joke to be honest, i mean how can for the most part the software be an exceptional in terms of computational power, and then this garbage is thrown at me? yeah just silly.

 


 

product(n/k^2-1/(k*n), k = 1 .. n-3)

-(-1)^(n-2)*GAMMA(-n^2+n-2)*(1/n)^(n-2)*n/(GAMMA(n-2)^2*GAMMA(-n^2+1))

(1)

seq(product(n/k^2-1/(k*n), k = 1 .. n-3), n = 3 .. 10)

1, 15/4, 138/25, 6545/1296, 16215/4802, 2342949/1310720, 7512505/9565938, 29537761/100000000

(2)

seq(convert(-(-1)^(n-2)*GAMMA(-n^2+n-2)*(1/n)^(n-2)*n/(GAMMA(n-2)^2*GAMMA(-n^2+1)), 'factorial'), n = 3 .. 10)

Error, (in GAMMA) numeric exception: division by zero

 

Um there is no gamma it was converted to a factorial.....? but ok....

convert(-(-1)^(n-2)*GAMMA(-n^2+n-2)*(1/n)^(n-2)*n/(GAMMA(n-2)^2*GAMMA(-n^2+1)), 'factorial')

-(-1)^(n-2)*factorial(-n^2+n-3)*(1/n)^(n-2)*n/(factorial(n-3)^2*factorial(-n^2))

(3)

seq(-(-1)^(n-2)*factorial(-n^2+n-3)*(1/n)^(n-2)*n/(factorial(n-3)^2*factorial(n^2)), n = 100 .. 100)

Error, numeric exception: division by zero

 

``


 

Download REALLY_REALLY.mw

Just like the title described, I have encountered an error when I use the command "expand". Actually, I just follow the example, but it doesn't work. Please help me or tell me how can I solve it in other commands.


restart;
alias(epsilon = e, omega = w, omega[0] = w0, t[1] = t1, t[2] = t2); e := proc (t1, t2) options operator, arrow; e end proc; w0 := proc (t1, t2) options operator, arrow; w0 end proc; a := proc (t1, t2) options operator, arrow; a end proc; f := proc (t1, t2) options operator, arrow; f end proc; mu := proc (t1, t2) options operator, arrow; mu end proc;
ode := (D@@2)(u)+2*mu*e*D(u)+w0^2*u+e*w0^2*u^3-e*f*cos(omega*t) = 0;
                                               2  
     @@(D, 2)(u) + 2 mu epsilon D(u) + omega[0]  u

                          2  3                             
        + epsilon omega[0]  u  - epsilon f cos(omega t) = 0
e_oredr := 1;
ode := simplify(subs(D = sum('e^(i-1)*D[i]', 'i' = 1 .. e_oredr+1), ode), {e^(e_oredr+1) = 0});
 / 3         2                                                 
 \u  omega[0]  + 2 (epsilon D[2] + D[1])(u) mu - cos(omega t) f

                  \                   2                   
    + 2 D[1, 2](u)/ epsilon + omega[0]  u + D[1, 1](u) = 0
simplify(collect(%, e), {e^(e_oredr+1) = 0});

u := sum('v[i]*e^i', 'i' = 0 .. e_oredr);
                      epsilon v[1] + v[0]
ode := simplify(collect(ode, e), {e^2 = 0});
for i from 0 to e_oredr do eq[i] := coeff(lhs(ode), e, i) = 0 end do;
                       2                         
               omega[0]  v[0] + D[1, 1](v[0]) = 0
       3         2           2                       
   v[0]  omega[0]  + omega[0]  v[1] + 2 D[1](v[0]) mu

      - cos(omega t) f + 2 D[1, 2](v[0]) + D[1, 1](v[1]) = 0
remove(has, lhs(eq[1]), cos); convert(%(t1, t2), diff);
eq[1] := %-convert(f*cos(sigma*t2+t1*w0), 'exp');

v[0] := A(t2)*cos(w0*t1+B(t2)); convert(%, 'exp'); v[0] := unapply(%, t1, t2);
                         /1                             
       (t1, t2) -> A(t2) |- exp(I (omega[0] t1 + B(t2)))
                         \2                             

            1                              \
          + - exp(-I (omega[0] t1 + B(t2)))|
            2                              /

expand(eq[1]);
Error, (in property/ConvertProperty) invalid input: PropRange uses a 2nd argument, b, which is missing
collect(%, exp(I*w0*t1));
Error, (in collect) invalid 1st argument proc (t1, t2) options operator, arrow; A(t2)*((1/2)*exp(I*(w0*t1+B(t2)))+(1/2)*exp(-I*(w0*t1+B(t2)))) end proc
coeff(%, exp(I*w0*t1));
map(proc (x) options operator, arrow; x*exp(-I*B(t2)) end proc, %);
combine(%, 'exp');
subs(I*B(t2) = I*sigma*t2-I*C(t2), B(t2) = sigma*t2-C(t2), %);
conds := combine(%, 'exp');
                               0

 

With this feature, it requires the worksheet from which to import a result from executing it from the worksheet with the Run worksheet command to have section titles as Input  and Calculation respectively.

 

This is a really helpful feature, but what i need is to "fetch" the content from a number of worksheets in a folder from a specified particular section name, for a number of different section names.

First 809 810 811 812 813 814 815 Last Page 811 of 2217