MaplePrimes Questions

Hello

Moving from Mathematica to Maple and back these couple of days is driving me insane.  I get stuck trying to translate very simple things for not knowing each command belongs to each software.  Therefore I do apologize for another silly question. 

Given the list of indexed variables

varA := [A[1, 0], A[1, 1], A[1, 2], A[1, 3], A[1, 4], A[1, 5], A[1, 6], A[1, 7], A[1, 8], A[1, 9], A[2, 0], A[2, 1], A[2, 2], A[2, 3], A[2, 4], A[2, 5], A[2, 6], A[2, 7], A[2, 8], A[2, 9], A[3, 0], A[3, 1], A[3, 2], A[3, 3], A[3, 4], A[3, 5], A[3, 6], A[3, 7], A[3, 8], A[3, 9]]

how to apply the following substitution 

varA/. {Subscript[A, m_, 2] -> Subscript[B, m, 3], 
  Subscript[A, m_, 3] -> Subscript[B, m, 2], 
  Subscript[A, m_, 5] -> Subscript[B, m, 6], 
  Subscript[A, m_, 6] -> Subscript[B, m, 5], 
  Subscript[A, m_, 7] -> Subscript[B, m, 9], 
  Subscript[A, m_, 9] -> Subscript[B, m, 7]}

After trying a couple of commands such as map, subs, etc. I decide to try fromMma but no avail.  

Many thanks for the patience and help.

 

Ed

 

 

I want to solve the following system of PDEs with Maple: 

In fact, I want to determine q1,n1,p1,nn1,qn1,pn1 as a functions of pphi1 (assume  ne1(X,T)=(alpha/(2))*pphi1(X,T))

(mu, nu, beta, lambda, TE , alpha and TT are constant, but q1,n1,p1,nn1,qn1,pn1 depend on (X,T))

How do I do that?             

                   
> diff(q1(X, T), X)-lambda*(diff(n1(X, T), X)) = 0;

diff(pphi1(X, T), X)+TE*(diff(p1(X, T), X))-lambda*(diff(q1(X, T), X)) = 0;

-lambda*(diff(p1(X, T), X))+3*(diff(q1(X, T), X)) = 0;

-lambda*(diff(nn1(X, T), X))+diff(qn1(X, T), X) = 0;

-lambda*(diff(qn1(X, T), X))+beta*TT*(diff(pn1(X, T), X))-beta*(diff(pphi1(X, T), X)) = 0;

-lambda*(diff(pn1(X, T), X))+3*(diff(qn1(X, T), X)) = 0;

-mu*ne1(X, T)-nu*nn1(X, T)+n1(X, T) = 0;

 

 

 

Dear All, 

 

I am trying to solve the following differential equation, which is a kind of Spherical Harmonics. Can anyone please help me out how to solve this?

((D@@2)(y))(r)+(D(y))(r)/r-sin(y(r))*cos(y(r))/r^2+sin(y(r))^2/r-sin(y(r))-sin(2*y(r)) = 0

 

Thanks 

Hello every one:

I am trying to plat the graph of a function (which has been defined in my code). I use the plat 3D operator but it doesn't give me the correct plot . I even increase the digites and numpoints but appearently it gave me less precise plot . 

The problem of plots is as follows :

First I defined the function V and  asking maple to compute the values of V at some random points, spacially at (0,0) , (0,2*Pi) and (2*Pi,0) . It gave me 0 which means Maple computes the values correctly because it can be mathematically proved  that this function has the value 0 on all the board of a triangle with vertices (0,0) , (0,2*Pi) and (2*Pi,0) . 

As you can see in my code maple doesn't show the correct value (0)  for the boundary points even at (0,0) ! 

 

I don't know how shoud I fix this problem.You can find my code in attached .Thanks in advanced for your help. Maple_question.mw 

Could some Maple expert please explain this strange behavior of int? Using Maple 2020 on windows 10



Same integrand. But in one case exp(arcsin(x)) and in another exp(1)^arcsin(x). Why one worked and not the other?

Here is the code

restart;
integrand1 := (x^3*exp(arcsin(x)))/sqrt(1 - x^2);
integrand2 := (x^3*exp(1)^arcsin(x))/sqrt(1 - x^2);
simplify(integrand1-integrand2);
int(integrand1,x);
int(integrand2,x)

 

Download bug.mw

 

 

I have a simple little physics scenario that I'd like to nicely pretty print showing the relationships between KE = elastic PE to find velocity when the object returns back to x=0.

(simplify(solve(m*v^2/2*Unit('J') = F*x/2*Unit('J'), v)[1]) assuming positive)

This resolves to:

It would be nice to have all the individual terms reduce like how this works in Mathematica:

FullSimplify[Solve[1/2*m*v^2 == 1/2*F*x, v], {F > 0, x > 0, m > 1}]

 

Any tips on how to get all the square roots to reduce?

bessel.mwHow would I tell maple to stop using a function class to abrievate the work.  I'm trying to have it show the actual derivative instead of it giving me a Bessel function

 

I want to see the series solution in other words

 I'd like to  make following function  composition 6 times,  the  notation @  is used  6 times.  How to write it easily?

f:=x->sqrt(1+x);
(f@f@f@f@f@f)(x)

HOW TO WRITE BOX COUNTING DIMENSION IN FRCATAL

Hello

I have lots of lists of indexed variables (I am not sure if that is the correct name for it. Please correct me if it is not).  One example is (length of the list can change as well as the indices of the variables):

ans1 := [alpha[3, 7], alpha[3, 8], alpha[3, 9]]

and I need to retrieve two lists from it:  1) [3,3,3] and 2) [7,8,9].  I could not figure out how to do it.

Many thanks.

Ed

Dear Brothers and Sisters,

I faced warnning while simulating the code below was running

restart;
with(plots);
beta := 0.143e-1; delta := 0.7e-1; PI := 2.5; mu := 0.16e-1; tau := .7; rho := 0.4e-3; epsilon := .15; sigma[2] := 0.2e-1; sigma[1] := 0.1e-3; eta := 0.1e-1;
a[1] := 2; a[2] := 5; w[1] := 10; w[2] := 50; w[3] := 20; T := 4;


u[1] := min(max(0, z), 1); z := beta*(1-u[3])*s(t)*(sigma[2]*e(t)+sigma[1]*i[t])*(lambda[2](t)-lambda[1](t))/w[1]; u[2] := min(max(0, c), 1); c := (lambda[2](t)*e(t)+beta*i(t)+lambda[4](t)*((1-tau)*delta*e(t)+epsilon*i(t))+lambda[3](t)*(delta*tau*e(t)+epsilon*i(t)))/w[2]+lambda[2](t)*e(t)/w[2]; u[3] := min(max(0, e), 1); e := (beta*(1-u[1])*s(t)*sigma[2]*e(t)+sigma[1]*i[t])/w[3];
Error, recursive assignment

sys := diff(s(t), t) = PI+eta*r(t)-((1-u[1])*(1-u[1]))*beta*(sigma[1]*i(t)+sigma[2]*e(t))*s(t)-mu*s(t), diff(e(t), t) = (((1-u[1])*(1-u[1]))*beta*beta)*(sigma[1]*i(t)+sigma[2]*e(t))*s(t)-(u[2]+u[3]+delta+mu)*e(t), diff(i(t), t) = (1-u[2])*tau*delta*e(t)-(u[2]+u[3]+epsilon+rho+mu)*i(t), diff(r(t), t) = (1-u[2])*(1-tau)*delta*e(t)+(1-u[2])*epsilon*i(t)-(mu+eta)*r(t), diff(lambda[1](t), t) = lambda[1]*((1-u[3])*(1-u[1])*beta*(e*sigma[2]+i*sigma[1])-mu)-lambda[2]*(1-u[3])*(1-u[1])*beta*(e*sigma[2]+i*sigma[1]), diff(lambda[2](t), t) = -a[1]+lambda[1]*((1-u[3])*(1-u[1])*beta*sigma[2]*s-lambda[2]*(1-u[3])*(1-u[1])*beta*sigma[2]*s-u[2]-u[3]-delta-mu)-lambda[3]*(1-u[2])*tau*delta-lambda[4]*(1-u[2])*(1-tau)*delta, diff(lambda[3](t), t) = -a[2]+lambda[1]*(1-u[3])*(1-u[1])*beta*sigma[1]*s-lambda[2]*(1-u[3])*(1-u[1])*beta*sigma[1]*s+lambda[3]*(u[2]+u[3]+epsilon+rho+mu)-lambda[4]*(1-u[2])*epsilon, diff(lambda[4](t), t) = -lambda[1]*eta+lambda[4]*(mu+eta), s(0) = 1000000, e(0) = 1000, i(0) = 89, r(0) = 16, lambda[1](T) = 0, lambda[2](T) = 0, lambda[3](T) = 0, lambda[4](T) = 0;
p1 := dsolve({sys}, type = numeric, method = bvp[midrich], abserr = .1);
Error, (in dsolve/numeric/bvp/convertsys) e(t) and e cannot both appear in the given ODE
p2o := odeplot(p1, [t, i(t)], 0 .. 2, numpoints = 100, labels = ["Time (months)", "i"], labeldirections = [horizontal, vertical], style = line, color = red, axes = boxed);
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution
plots[display](p2o);

 

May I get your help please? Thank you in advance. Lokking forward...

Dear friends, please I would like to ask for your help with the following situation: 

Suppose I have an Array   A:=Array([4]);   and I have to take the element A[i], add 1 to it and then append it to A, with i = 1..3. The result would be, 

A:= [4 5 6 7] 

I do know how to perform the task with a for loop, however I know that for large i it is more advisable to use seq for speed reasons.   I cannot find the right syntax to perform such a task with seq. Could you please advise me how to do so? 

Many thanks for your help. 

Hi.

I'm working on an electronics project currently. In that project I have been trying to solve a system of inequalities, as shown by the picture from Maple below:

restart;

R__1 := 1;
lign1 := V__i/(R__4*(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4)) = C*(k__1 - R/R__C + R);
lign2 := V__i*(1/R__1 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__2 - R/R__C + R);
lign3 := V__i*(1/R__2 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__3 - R/R__C + R);
lign4 := V__i*(1/R__3 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__4 - R/R__C + R);
lign5 := V__i*(1/R__1 + 1/R__2 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__5 - R/R__C + R);
lign6 := V__i*(1/R__1 + 1/R__3 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__6 - R/R__C + R);
lign7 := V__i*(1/R__2 + 1/R__3 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__7 - R/R__C + R);
solve({lign1, lign2, lign3, lign4, lign5, lign6, lign7}, [R__4, R__2, R__3, R__C, R, C, V__i]);

Here's a picture as well:

However, the solution is simply that V_i = 0 and C=0, which is not really helping me. Am I doing something wrong here or is my system of equalities simply unsolvabe?

 

Can you please post the procedure for interfacing maple with visual molecular dynamics (VMD) software. Thank you.

Hi all,

For some range of my model parameter, the numerical integration fails to give a numerical answer rather a symbolic expression. Any idea why?

Please see this attached.NumericInt.mw.

First 327 328 329 330 331 332 333 Last Page 329 of 2192