Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi

I have a problem with my maple. 

 

corrupt file 

Is there anybody who can help me solve this problem. 

Casper 

sys:={x+y=10,x^2-y^2+z^2=1};

{x+y = 10, x^2-y^2+z^2 = 1}

(1)

isolve(sys, n);

{x = -(1/20)*(1+20*n)^2+101/20, y = (1/20)*(1+20*n)^2+99/20, z = 1+20*n}

(2)

_SolutionsMayBeLost;  # It was set in Maple 10 or so!  E.g. x=5,y=5,z=-1 is not found.

_SolutionsMayBeLost

(3)

# Workaround

yz:=eliminate(sys,x);

[{x = -y+10}, {z^2-20*y+99}]

(4)

S:=isolve(yz[2], n);

{y = 20*n^2-38*n+23, z = 19-20*n}, {y = 20*n^2-22*n+11, z = 11-20*n}, {y = 20*n^2-18*n+9, z = 9-20*n}, {y = 20*n^2-2*n+5, z = 1-20*n}

(5)

map(u -> ( u union eval(yz[1],u) ), [S])[];  # The correct solution

{x = -20*n^2+38*n-13, y = 20*n^2-38*n+23, z = 19-20*n}, {x = -20*n^2+22*n-1, y = 20*n^2-22*n+11, z = 11-20*n}, {x = -20*n^2+18*n+1, y = 20*n^2-18*n+9, z = 9-20*n}, {x = -20*n^2+2*n+5, y = 20*n^2-2*n+5, z = 1-20*n}

(6)

 

This may seem a bit trivial, but I prefer f'(x) to writing diff(f(x),x) in 1D input. How to achieve?

differential.mw


 

15

 

"maple init loaded..."

(1)

In Document mode, this works fine.

f := proc (x) options operator, arrow; x^2 end proc

proc (x) options operator, arrow; x^2 end proc

(2)

diff(f(x), x)

2*x

(3)

But I mainly use Worksheet (1D) mode, and I can't seem to acheve the same, without using diff(f(x),x)

``

f:x->x^2

proc (x) options operator, arrow; x^2 end proc

(4)

f'(x)

Error, unexpected single forward quote

 

``


 

Download differential.mw

 

Hello,

Simple question:

Why does

restart;

(exp(I*t))^q;

`assuming`([simplify(%)], [t > 0, t < 2*Pi, q > 0, q < 1])

 

 

not simplify to exp(I*t*q)

?

does anyone khow to force maple to automatically simplify expressions that look like this:

restart:

cc:=arctan(sin(phi)/cos(phi))-arccos(cos(phi))      
simplify(cc) assuming phi::real; #should be zero

i've played with convert/expand/simplify and in certain cases of course i can force maple to do this... (kind of manually).. but was hoping this could be more automatic.

thanks!

 

The round(x) statement rounds x to the nearest integer but if x has unirs it appears not to work. Known bug?

RoundUnits.mw
 

restart

a := 15; b := 5.3

c := (1/100)*a+b

5.450000000

(1)

c := round(c)

5

(2)

``

A := 15*Unit('cm'); B := 5.3*Unit('m')

C := A+B

15*Units:-Unit(cm)+5.3*Units:-Unit(m)

(3)

C := simplify(C)

5.450000000*Units:-Unit(m)

(4)

Cr := round(C)

round(5.450000000*Units:-Unit(m))

(5)

``


 

Download RoundUnits.mw

 

Hello, I am getting the following output from maple: (-ln(lambda)-gamma-ln(k+b))/(k+b) . I have all variables (lambda, k, b) but not gamma and I am not sure what actually it is. I believe it is some kind of Gamma function but I cannot find any expressions for that. Ussually for gamma function I get something like GAMMA(x). Does someone know what this lower case gamma is?

I wish to write a simple procedure to evaluate the Poisson quantile function, F, for many possible parameter values, lambda.

The Maple commands to evaluate F for individual lambda values works just fine, however, I have tried to write a simple procedure to evaluate F for prescribed lambda values (imported from Excel) but to no avail. I'm missing something quite basic, I'm sure.

Can anybody offer a suggestion please? Thanks.

 

Inverse_Poisson_Procedure.mw

i want to gain diff(p(t), t) and diff(q(t), t) and Jacobian matrix
 according to the attached pdf file.

please help me.

thanks

simplify.mw
 

k := diff(a(t), t) = -mu*a(t)-(1/4)*alpha6*a(t)*sin(gamma(t))

diff(a(t), t) = -mu*a(t)-(1/4)*alpha6*a(t)*sin(gamma(t))

(1)

j := a(t)*(diff(gamma(t), t)) = 2*a(t)*sigma-(6*(1/8))*(alpha1-alpha2+(1/3)*alpha3)*a(t)^3-(1/2)*alpha6*a(t)*cos(gamma(t))

a(t)*(diff(gamma(t), t)) = 2*a(t)*sigma-(3/4)*(alpha1-alpha2+(1/3)*alpha3)*a(t)^3-(1/2)*alpha6*a(t)*cos(gamma(t))

(2)

"p(t):=a(t)*cos(gamma(t))"

proc (t) options operator, arrow, function_assign; a(t)*cos(gamma(t)) end proc

(3)

"q(t):=a(t)*sin(gamma(t))"

proc (t) options operator, arrow, function_assign; a(t)*sin(gamma(t)) end proc

(4)

diff(p(t), t)

(diff(a(t), t))*cos(gamma(t))-a(t)*(diff(gamma(t), t))*sin(gamma(t))

(5)

(-mu*a(t)-(1/4)*alpha6*a(t)*sin(gamma(t)))*cos(gamma(t))-a(t)*(2*sigma-(6*(1/8))*(alpha1-alpha2+(1/3)*alpha3)*a(t)^2-(1/2)*alpha6*cos(gamma(t)))*sin(gamma(t))

(-mu*a(t)-(1/4)*alpha6*a(t)*sin(gamma(t)))*cos(gamma(t))-a(t)*(2*sigma-(3/4)*(alpha1-alpha2+(1/3)*alpha3)*a(t)^2-(1/2)*alpha6*cos(gamma(t)))*sin(gamma(t))

(6)

diff(p(t), t)

2*t

(7)

``


subs.pdf

Download simplify.mw

 

 

Hi

I am having some trouble with a procedure. One of the procedures arguments is a mathematical function g(var). For simplification lets say I wish to make a procedure which calculates some values of the unknown function, g: 

SomeProc:=proc(g,var:=x)
f(var):=g
return f(2)
end proc

This does not seem to work. No matter what value of var is inserted into f, the return is g(var). 

Any help would be much appreciated:

How do I combine log10 terms. I can do it with natural logs but I have not been able do do it with log10.

 

    

 

Hello, I would like to make my polynomial equation simpler by replacing every coefficient of each degree in s by any constant.

For example, one of the variable solutions it is:


How can i re-write this equation in the form, lets say, C0+C1*s+C2*s^2+C3*s^3?

I draw a 3d graph and now i want the table of this graph. how can we get a table from the data of a plotted graph.

May grapg was obtained from the following commands

 

restart;
plot3d(1/2*(q^(2*n)-5.*q^n+(2.*q-1)^n+3), q = 2 .. 15, n = 2 .. 20);
 

I am carrying out a research in dynamical system to which end I need to do optimal control. I have coded the control equations but its not displaying any result. I need guidance. The code is shown below....

 

restart;
with(plots);
r := 3; r[1] := 3; k := 10; a := 0.2e-1; b := 0.1e-1; c := 0.1e-1; beta := 0.3e-1; alpha := 0.3e-1; m := 0.5e-1;
z := 40; q := 5; p := 100; T := 3;
sigma := 0.1e-1; k[1] := 10; rho := 0.5e-1;

u[1] := min(max(0, z), 1); z := (a*m*k*lambda[2](t)*x(t)*y(t)-lambda[1](t)*r*(1+b*x(t)+c*y(t))*x(t)*x(t))/(z*k*(1+b*x(t)+c*y(t))); u[2] := min(max(0, q), 1); q := -lambda[1](t)*beta*x(t)*s(t)/q; u[3] := min(max(0, p), 1); p := -(r[1]*lambda[3](t)*s(t)*s(t))/(p*k[1]);
NULL;
sys := diff(x(t), t) = r*x(t)*(1-(1-u[1])*x(t)/k)-a*m*x(t)*y(t)/(1+b*x(t)+c*y(t))-beta*(1-u[2])*x(t)*s(t), diff(y(t), t) = -alpha*y(t)+a*m*x(t)*y(t)/(1+b*x(t)+c*y(t)), diff(s(t), t) = sigma*s(t)+r[1]*s(t)*(1-(1-u[3])*s(t)/k[1])-rho*s(t)*y(t), diff(lambda[1](t), t) = -lambda[1](t)*(r-2*r*(1-u[1])*x(t)/k-a*y(t)*(1+c*y(t))/((1+b*x(t)+c*y(t)) . (1+b*x(t)+c*y(t)))-beta*(1-u[2])*s(t))-lambda[2](t)*a*m*(1-u[1])*(1+c*y(t))*y(t)/((1+b*x(t)+c*y(t)) . (1+b*x(t)+c*y(t))), diff(lambda[2](t), t) = -lambda[1](t)*a*x(t)*(1+b*x(t))/((1+b*x(t)+c*y(t))*(1+b*x(t)+c*y(t)))+lambda[2](t) . (-alpha+(a*m*(1-u[1]) . (1+b*x(t)))*x(t)/((1+b*x(t)+c*y(t))*(1+b*x(t)+c*y(t))))+lambda[3](t)*rho*s(t), diff(lambda[3](t), t) = lambda[1](t)*beta*(1-u[2])*x(t)-lambda[1](t)*(r[1]-2*r[1]*(1-u[3])*s(t)/k[1]-sigma-rho*y(t)), x(0) = 100, y(0) = 200, s(0) = 100, lambda[1](T) = 0, lambda[2](T) = 0, lambda[3](T) = 0;
p1 := dsolve({sys}, type = numeric, method = bvp[midrich], abserr = .1);
 

Hi!

I have the following problem: to create a special elimination ordering which is a weighted degree ordering suitable for elimination + pure lexicographic ordering. Let me provide an example. Assume my variables are x,y,z,t,u,v and I want to eliminate x,y,z. For this purpose, I define the weight vector [1,1,1,0,0,0] and compare monomials wrt corresponding weighted degree. If such degrees are equal, I compare monomials by pure lexicographic ordering. This is exactly what I need. How to obtain such monomial ordering by the package Groebner? I have tried monomial orderings defined by matrices using command  'matrix'(M,vars) but it seems it does not work for 30 variables.

Any suggestion? Thanks in advance.

First 744 745 746 747 748 749 750 Last Page 746 of 2219