gkokovidis

2370 Reputation

13 Badges

20 years, 289 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

That is correct.  It does not support the Mac platform.  Details are here.

Regards,

Georgios Kokovidis

Dräger Medical

One way is to use the ?alias command.

restart:

alias(g=1+i);

g

                                         (1)

h:=(1+i)^2+(1+i)^3*A+(1+i)^4*B;

g^2+g^3*A+g^4*B

(2)

 

 

Download alias.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

There are many different ways to get a vector field plot (animated or static), and the same for the curve.  The code below has a static fieldplot with an animated curve on the same plot.  Right click on the plot after executing the worksheet, and select Animation-Play.  See ?display for more help with combining multiple plots.


restart:

with(plots):

p1:=fieldplot([x/(x^2+y^2+4)^(1/2), -y/(x^2+y^2+4)^(1/2)], x = -2 .. 2, y = -2 .. 2):

p2:=animate(implicitplot,[x^2-y^2 = r, x = -2 .. 2, y = -2 .. 2],r=0.2..1):

display(p1,p2);

 

 

Download fieldplotanimate.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

Here is one way.  For more details, see ?collect help page.

restart:

eq:=k*(2*x+y-3*z+2)+s*(5*x+5*y-4*z+3)=0;

collect(eq,[x,y,z]);

 

Regards,

Georgios Kokovidis

Dräger Medical

This looks like a round-off issue.  Increase Digits.  Running your example worksheet with Digits set to 52 gave consistent results every time I executed.

Regards,

Georgios Kokovidis

Dräger Medical

Do you have a ?restart command at the beginning of your worksheet?  If not, try adding one, and re-execute your worksheet a few times to see if the results are consistent (with what you are expecting).  Can you upload your worksheet instead of pasting the images?  It will be easier for us to try and reproduce what you are seeing, in order to come up with a possible solution.

Regards,

Georgios Kokovidis

Dräger Medical

Platform?  On my Win XP laptop, double clicking the Maple icon launches a new instance. In each instance, I can execute a different worksheet. You can also launch multiple instances of command line Maple on a Windows machine using a batch file. 

 

Regards,

Georgios Kokovidis

Dräger Medical

Your syntax for ode1 and ode2 does not look correct.

restart:with(DEtools):
ode1:=diff(x(t),t)=x(t); ode2:=diff(y(t),t)=-y(t);
                         d             
                        --- x(t) = x(t)
                         dt            
                         d              
                        --- y(t) = -y(t)
                         dt             
phaseportrait([ode1, ode2], [x(t), y(t)], t = 0 .. 100, [[x(0) = 2, y(0) = 1], [x(0) = 1, y(0) = 2]], stepsize = 0.02, colour = grey, linecolour = black);

Download phaseportrait.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

See the help page for ?Student[Calculus1][TangentTutor]

Regards,

Georgios Kokovidis

Dräger Medical

See the help page for ?alias

restart:

alias(e=exp(1));

e

 

evalf(exp(2));

7.389056099

 

evalf(e^2);

7.389056096

 

Remove alias.

alias(e=e);

evalf(e^2);

e^2

 
 

Download exp_alias.mw

Regards,

Georgios Kokovidis

Dräger Medical

See attached worksheet.  A restart before your Stage 2 calculations clears up the problem.

 

Trade and the Environment

The Copeland and Taylor (2003) Model

Author:  Peter Kennedy, University of Victoria

Modified by:  Alan Mehlenbacher, University of Victoria

 

 

restart:

Production Functions for the clean good (Y) and pollution (X)

y := k^beta*l^(1-beta)

k^beta*l^(1-beta)

(1)

x := (1-theta)*k^sigma*l^(1-sigma)

(1-theta)*k^sigma*l^(1-sigma)

(2)

Cost Minimization for an X Sector Firm

Stage 1: choose k & l to produce one unit of potential output

The Lagrangean is:

LGkl := r*k+w*l+lambda*(1-k^sigma*l^(1-sigma))

r*k+w*l+lambda*(1-k^sigma*l^(1-sigma))

(3)

First-order conditions:

foc1kl := diff(LGkl, k); foc2kl := diff(LGkl, l); foc3kl := diff(LGkl, lambda)

r-lambda*k^sigma*sigma*l^(1-sigma)/k

 

w-lambda*k^sigma*l^(1-sigma)*(1-sigma)/l

 

1-k^sigma*l^(1-sigma)

(4)

solnkl := solve([foc1kl, foc2kl, foc3kl], [k, l, lambda])

[[k = -exp(ln(-(-1+sigma)*r/(sigma*w))*sigma)*sigma*w/((-1+sigma)*r), l = exp(ln(-(-1+sigma)*r/(sigma*w))*sigma), lambda = -exp(ln(-(-1+sigma)*r/(sigma*w))*sigma)*w/(-1+sigma)]]

(5)

Thus, the solutions are

kx := simplify(solnkl[1][1]); lx := simplify(solnkl[1][2])

k = -(-(-1+sigma)*r/(sigma*w))^sigma*sigma*w/((-1+sigma)*r)

 

l = (-(-1+sigma)*r/(sigma*w))^sigma

(6)

and the unit cost function is

cF := simplify(r*kx+w*lx)

r*k+w*l = -w*(-(-1+sigma)*r/(sigma*w))^sigma/(-1+sigma)

(7)

Stage 2: choose Z (emissions subject to tax tau) and F to produce one unit of net output

restart:

LGzF := tau*z+cF*F+lambda*(1-z^alpha*F^(1-alpha));

tau*z+cF*F+lambda*(1-z^alpha*F^(1-alpha))

(8)

foc1zF := diff(LGzF, z);

tau-lambda*z^alpha*alpha*F^(1-alpha)/z

 

cF-lambda*z^alpha*F^(1-alpha)*(1-alpha)/F

 

1-z^alpha*F^(1-alpha)

(9)

solnzF := solve([foc1zF, foc2zF, foc3zF], [z, F, lambda]);

[[z = -cF*exp(-alpha*ln(-cF*alpha/((-1+alpha)*tau)))*alpha/((-1+alpha)*tau), F = exp(-alpha*ln(-cF*alpha/((-1+alpha)*tau))), lambda = -cF*exp(-alpha*ln(-cF*alpha/((-1+alpha)*tau)))/(-1+alpha)]]

(10)

Thus the solutions are

zx := simplify(solnzF[1][1]);

z = -cF*(-cF*alpha/((-1+alpha)*tau))^(-alpha)*alpha/((-1+alpha)*tau)

 

F = (-cF*alpha/((-1+alpha)*tau))^(-alpha)

(11)

 

 

 

Download CTmodel-1Restart.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

In my edition of the book, the equation is y+dy=(x+dx)^2.  This can be expanded using FOIL.  In Maple, you will not see the steps, just the final product.

restart:

eq:=(x+dx)^2;

expand(eq);

You could do all the steps that you would do by hand in Maple and then combine them in the end.

First:=x*x;

Outter:=x*dx;

Inner:=x*dx;

Last:=dx*dx;

eq_expanded:=First+Outter+Inner+Last;

 

Regards,

Georgios Kokovidis

Dräger Medical

Here is one way.  You can modify it for your own needs.

Download pointplotcircles.mw

The default option for symbolsize = 10, so your B array will need to be scaled in order for this to make sense when you display it.

Regards,

Georgios Kokovidis

Dräger Medical

See the online help page Plotting Two-dimensional differential equations, to get you started.  The attached is a modified example from the help. 

animatede.mw 

Regards,

Georgios Kokovidis

Dräger Medical

Here is one example.  See the ?plot/options help page for more details.

restart: with(plots):

polarplot([cos(t), sin(t), t = 0 .. 4*Pi], color = "NavyBlue", thickness = 3, filled = [color = "Blue", transparency = .5]);

Download polarplotfilled.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

First 14 15 16 17 18 19 20 Last Page 16 of 75