Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015

Hi

I'm using solve,and i want to quantify the dimensions of the solution spaces of the output. For example

solve([a+b, c+b])

produces a singular 1 dimensional object

solve([a+b, -b^2+d^2])

produces 2 objects with dimension 2

EDIT:
my intuition is that the simplest way of doing this is to create a counter for equations of the form
variable=variable
and to run it on each of the lists that solve might produce- so far this kind of thing is beyond me

 

Hello dear users!

Hope you would be fine. I want to fine the roots of the following cubic equation

u^3+u*d[1]+d[0];

when the discriment is zero, positive and negative. I am waiting your positive response. Thanks

 

@acer @Carl Love @Kitonum @Preben Alsholm

 Dear Sir,

I trying to merge two which are one is an actual plotted graph and another one zoomed from the same graph. I want to copy zoomed graph into an actual graph, can anyone help in this regard?

My actual graph is like as follows

and after zooming this graph I got as follows

Now I want to change (Insert the zoomed graph inside the actual graph where the text is inserted) by using these two graphs as below

Please help me to plot like this...

Hi!

Hoped everything is fine. I want to integrate the following expression under the different conditions of discriments Delta. 

int(1/(a[3]*(u(eta)^3+d[2]*u(eta)^2+d[1]*u(eta)+d[0])), eta);

when Delta = 0;Delta > 0 and Delta < 0.

where discriments Delta = -27*(2*(d[2])^3/27+d[0]-d[1]*d[2]/3)^2-4*(d[1]-(d[2])^2/3)^3;

I am waiting your positive respone.

 

@acer @Carl Love @Kitonum @Preben Alsholm

Hey and Thanks for your input.


 

restart; f := ((1/2-I*t)^(-s)-(1/2+I*t)^(-s))/(2*I); fc := evalc(f); `assuming`([simplify(int(f, t = 0 .. infinity))], [s > 1]); `assuming`([simplify(int(fc, t = 0 .. infinity))], [s > 1])

-((1/2)*I)*((1/2-I*t)^(-s)-(1/2+I*t)^(-s))

 

exp(-(1/2)*s*ln(1/4+t^2))*sin(s*arctan(2*t))

 

2^(s-1)/(s-1)

 

(1/2)*4^s/(s-1)

(1)

``


 

Download function_evaluation_goes_wrong.mw

 

 

Am I doing something wrong?

Hi everybody, 

Here is a piece of a more important worksheet where I need to push the number of Digits farther (Digits:=30:) than the default value.
Nevertheless I don't want to be annoyed by excessively lengthy outputs and I use interface(displayprecision=6).

It seems that the result of an operation which contains only floats is a 6 digits precision number but, as soon as the same operation contains an integer, the displayed precision equals the value of Digits  ???
To be honnest, simpler situations do not exhibit the behaviour shown in the attached file.

Can anyone explain me why I get tho wifferent displays for the quantity names xi__d ? 

As always, great thanks in advance

displayprecision.mw

 

PS : I use Maple 2015.2 on Mac OSX El Capitan

 

I am having some issues with NLPSolve (the code follows). As far as I can tell from the documentation, what is entered is syntactically correct.

 

with(Optimization)
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, 

  NLPSolve, QPSolve]
nlc:={0<=d*(c-a) + c*(b-d), 0<=d*(c-e)+ c*(f-d), 0>=f*(e-a)+e*(b-f), (b-d)<=d*(c-a)+c*(b-d),(f-d)<=d*(c-e)+c*(f-d),(b-f)>=f*(e-a)+e*(b-f),(c-a)<=d*(c-a) + c*(b-d), (c-e)<=d*(c-e)+ c*(f-d), (e-a)>=f*(e-a)+e*(b-f),(c-a)+(b-d)<=d*(c-a) + c*(b-d), (c-e)+(f-d)<=d*(c-e)+ c*(f-d), (e-a)+(b-f)>=f*(e-a)+e*(b-f),2*(c-a)+(b-d)<=d*(c-a) + c*(b-d), 2*(c-e)+(f-d)<=d*(c-e)+ c*(f-d), 2*(e-a)+(b-f)>=f*(e-a)+e*(b-f)}

p:=2*(f-a)*(d-b) - [(d-b)*(c-a) + (d-f)*(e-c) + (f-b)*(e-a)]

NLPSolve(p,nlc)
Error, (in Optimization:-NLPSolve) non-numeric result encountered
 

Any help is much appreciated.

I am working on problems in identifiability and I am interested in how many Lie derivatives of two kinds are required to get a full result for a simple system, and more interestingly a way of visualising what comes out when too few Lie derivatives are used. 

The method is simple, I use Lie derivatives my own program GTS2 to get relationships that must be conserved for the output for two parameter vectors to give the same output (you can find it along with everything else for this question here.

An example of a list of parameter relationships is: 

[{R = R, Rh = Rh, alpha = alpha, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -(k[a2]*C[T]*R-kh[a1]*Ch[T]*Rh-kh[a2]*Ch[T]*Rh)/(R*C[T]), k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d2], kh[a1] = kh[a1], kh[a2] = kh[a2], kh[d1] = -(k[d1]*x[2]-k[d1]*xh[1]-k[d1]*xh[2]-k[d2]*x[2]+kh[d2]*xh[2])/xh[1], kh[d2] = kh[d2], x[1] = -x[2]+xh[1]+xh[2], x[2] = x[2], xh[1] = xh[1], xh[2] = xh[2]},{...},{...}]

i.e. they will show that there are multiple relationships that satisfy the Lie derivative conditions (each relationship is in a seperate set within the list) and within each set some parameters can vary freely (like R and Rh in the above) and others are determined by the ones that vary freely (like k[a1] and kh[a2]).
 
I want to count the numbers of parameters that have their relationships determined in three different ways so i can plot these numbers as the numbers of both types of Lie-Derivatives vary. These numbers are:
 

  1. N_i number of identifiabile parameters; parameters that in all solutions are of the form {p=ph or ph=p}
  2. N_l number of locally identifiable parameters; parameters that in all solutions take either the form {p=ph or ph=p} or {p=some function of the parameters with hs at the end of their names or ph=some function of exclusively the parameters without hs at the end of their names}
  3. N_u number of unidentifiable parameters; parameters that are neither identifiable or n locally-identifiable. 

    I think its nice to have a link to a worksheet at the end of a question, so here_it_is_again.

Acknowledgement: most of the code in the above was based on snippets written by @Carl Love in response to my previous questions.

EDIT: I had some teaching to do, so uploaded the question early as i was writing in a computer room- as a result the maple worksheet I originally included was confusing, the worksheet I've included in this edit is much easier to understand.

TLDR: i am looking a way to count the numbers of outputs of various types from a program that is built around maples solve feature, and stuck

I am attempting  to show that ocean wave B has a larger velocity than ocean wave A, because wave B has a longer wavelength.


 

I considered the displacement of two particels located at the peak of each wave at time = 0.  Differentiating the two displacement functions I determined the velocity function for each particle.  I used a sequence to determine the velocity for each particle over the time interval 1 to 20 seconds (integer).  The following syntax produces the information I need but I would like to format it as 3 columns in 20 rows, how could I edit the following syntax to do that?

restart;
R := {seq([t, evalf(-sin(t)), -.5*sin(.5*t)], t = 1 .. 20)};

This sequence prints 20 lists of t, evalf(-sin(t)), -.5*sin(.5*t)

What do I need to do to print 3 columns in 20 rows?

The first 3 rows would look something like

1 -0.84147 -0.23971
2 -0.9093 -0.42073
3 -0.14112 -0.49874

I am trying to show that two ocean waves of equal amplitude but different wavelenghts have different velocities and the wave with the largest wavelength will have the greatest velocity.    If someone has a suggestion about how to show this using SHM, any advice welcomed.

Les

 

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]);

Dear Users!

Hope you would be fine with everything. The following expression doesn't work for M=4,N=2,alpha=1. Please see the problem and try to fix. I shall be very thankful. 

 

simplify(sum(sum(((-1)^i2*GAMMA(N-i2+alpha)*2^(N-2*i2)/(GAMMA(alpha)*factorial(i2)*factorial(N-2*i2)*(N-2*i2+1))*(GAMMA(k+1)*(k+alpha)*GAMMA(alpha)^2/(Pi*2^(1-2*alpha)*GAMMA(k+2*alpha))))*(sum((1/2)*(-1)^i*GAMMA(k-i+alpha)*2^(k-2*i)*(1+(-1)^(N-2*i2+1+k-2*i))*GAMMA((1/2)*N-i2+1+(1/2)*k-i)*GAMMA(alpha+1/2)*L[k]/(GAMMA(alpha)*factorial(i)*factorial(k-2*i)*GAMMA(alpha+3/2+(1/2)*N-i2+(1/2)*k-i)), i = 0 .. floor((1/2)*k))), i2 = 0 .. floor((1/2)*N)), k = 0 .. M))

I have a list of relationships between variables, in this example there are three. The second of these requires one of the parameters to have a relationshipo that is not allowed with one of the other parmaters i.e. k[d2] = k[d1]; the rule is a parameter without h in its name can only be equated to itself or an expression with at least one parameter with h in its name.

How can I eliminate sets with relationships that break this rule?



Sa1 := [{R = R, Rh = R, C[T] = Ch[T]*kh[a1]/k[a2], Ch[T] = Ch[T], k[a1] = kh[a2]*k[a2]/kh[a1], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d2], kh[a1] = kh[a1], kh[a2] = kh[a2]}, {R = R, Rh = R, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -(C[T]*k[a2]-Ch[T]*kh[a1]-Ch[T]*kh[a2])/C[T], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d1], kh[a1] = kh[a1], kh[a2] = kh[a2]}, {R = R, Rh = Rh, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -k[a2], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d1], kh[a1] = -kh[a2], kh[a2] = kh[a2]}]

I am sure that this is a common enough problem. I want to show what commands I'm using to make an output in a maple worksheet in a latex document that i can include in a report.

So far I've got the export feature to work:

(here is an example mapleworksheet, texfile and a corresponding LatexProducedPDF),

but i can't see how to get it to include the commands that create the output.

I have a list of relationships between variables, in this example there are three. The third of these requires at least one of the parameters to take a negative value i.e. kh[a1] = -kh[a2] how do I eliminate sets from a list like this that do that?


Sa1 := [{R = R, Rh = R, C[T] = Ch[T]*kh[a1]/k[a2], Ch[T] = Ch[T], k[a1] = kh[a2]*k[a2]/kh[a1], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d2], kh[a1] = kh[a1], kh[a2] = kh[a2]}, {R = R, Rh = R, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -(C[T]*k[a2]-Ch[T]*kh[a1]-Ch[T]*kh[a2])/C[T], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d1], kh[a1] = kh[a1], kh[a2] = kh[a2]}, {R = R, Rh = Rh, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -k[a2], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d1], kh[a1] = -kh[a2], kh[a2] = kh[a2]}]

Hi, I'm very new to maple and I'm trying to solve  a system of ODEs but as of now it has taken over 5 hours to solve and is still evaluating. i feel as though I may have made some basic mistakes in the code which make the calculation much longer than it should be. I will try tyo explain the problem as well as I can

I'm trying to model a chemical reaction, and solve for the concentrations of two species involved in the reaction after a given time.

The rate of the reaction is given as: r=2900exp(-53300/RT)*Cno^0.62*Cnh3^-0.05;  where R is a constant, T is temperature and Cno and Cnh3 are the concentrations of NO and NH3 respectively. I am interested in solving for Cno and Cnh3 and getting an expression for each of them. I have tried to set up the system of ODEs as follows:

with(LinearAlgebra):

with(DEtools):

r := 2900*(exp(1)^(-53300/R*T)*CNO(t)^0.62*CNH3(t)^-0.05:

ode := diff(CNO(t), t) = -1* r: (negative because they are decaying with time)  

ode2 := diff(CNH3(t), t) = -1* r:

ics := CNO(1020) = 1.6, CNH3(1020) = 1.6; (sets up known initial conditions)

ode := subs(R = 8.314, T = 473, ode):

ode2 := subs(R = 8.314, T = 473, ode2):

sys_ode := (ode, ode2) :

dsolve([sys_ode, ics]);

 

I wonder if the problem has to do with the boundary conditions that I've set or not. Please help as I know I may have set it up very inefficiently which might be causing the problems. Thank you for your help

1 2 3 4 5 6 7 Last Page 2 of 55