gkokovidis

2370 Reputation

13 Badges

20 years, 291 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

What's missing in your original D(f@g) command is (x).  It should look like this:

D(f@g)(x);

 

Regards,

Georgios Kokovidis

Dräger Medical

See the examples here as a starting point.

Regards,

Georgios Kokovidis

Dräger Medical

One way is to use the ?print command.  Another is to suppress output with a colon, instead of a semicolon.  See below.  The last "end do" statement determines what gets displayed during execution of the loop.  You can upload your worksheet as well, so we can have a look at what you have done.

restart:

a:=1:
b:=1:
total:=0:
count:=0:
while total < 3 do
        a:=a*b;
        total:=total+a;
        count:=count+1;
end do;
count;

 

 

 

 

 

 

 

 

 

                                         (1)

a:=1:
b:=1:
total:=0:
count:=0:
while total < 3 do
        a:=a*b;
        total:=total+a;
        count:=count+1;
end do:
count;

                                         (2)

 

Download print.mw

Regards,

Georgios Kokovidis

Dräger Medical

In your worksheet, you have the following line:

f:=x->(sin(x-2)+x^3)*(1/(x+1)-2*x)/(sin*x^2-exp(x));

sin*x^2 has no meaning.  Do you mean sin(x^2), or sin(x)^2?

f:=x->(sin(x-2)+x^3)*(1/(x+1)-2*x)/(sin(x)^2-exp(x));

(1)

df:=x->diff(f(x),x);

(2)

df(x);

(3)

plot([f(x),df(x)],x=0..10);

 

 

Download d_df_x.mw

Regards,

Georgios Kokovidis

Dräger Medical

See the help page with examples for functional operators (?->) will get you there, and ?plot and ?display.  See also the help page for ?diff.  That should be enough to complete the task at hand.

When you are done, you can export your worksheet as rtf, which you can open in MS Word.

Regards,

Georgios Kokovidis

Dräger Medical

You can use ?fsolve over a range, or Roots, from the ?Student[Calculus1] package. 

restart:

Prob:=(w,T)->(B^2)*(sin(w*(T/2))^2)/((w/2)^2);

(1)

B:=1;

(2)

plot(Prob(w,6),w=-6..6);

 

with(Student[Calculus1]):

rPos:=Roots(Prob(w,6),0..6);

(3)

rNeg:=Roots(Prob(w,6),-6..0);

(4)

evalf(rPos);

(5)

evalf(rNeg);

(6)

 

Download zeros.mw

 

 Regards,

Georgios Kokovidis

Dräger Medical

See ?plot and ?solve and enter your function as x^2-8*x+20 for each case.  There are many examples that look similar to your problem.  Give it a try and see what happens.

 

Regards,

Georgios Kokovidis

Dräger Medical

It works for me in Maple 14.

 

restart:

u:=proc(a::integer)::integer;

 

local k;

 

a+k;

 

end proc:

 

u(3);

           (1)

u(3.1);

Error, invalid input: u expects its 1st argument, a, to be of type integer, but received 3.1

 

u(-1);

        (2)

 

 

Download proc_int.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

The example below was taken from the help page for the Units command, using your Z as input. Is this what you are looking for?

restart:

with(Units):UseSystem('FPS');

Z:=5*Unit('ft');

(1)

Z^2;

(2)

 

Download units.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

See the help page for the ?arrow command, which is part of the plots package.

Regards,

Georgios Kokovidis

Dräger Medical

One way would be to export the procedure as Maple input, which will create a file with a .mpl extension, which you can read into a new worksheet.

For example, the procedure example.mpl was created from the following code.

f := proc(x)
if x >= 0 then return (sqrt(x)); else return (FAIL); end if; end;

This was exported to the Windows desktop.  Then it was read into a new Maple worksheet.

 

read `C:/Documents and Settings/kokoge00/Desktop/example.mpl`;

(1)

f(2);

(2)

f(0);

(3)

f(-2);

(4)

 

 

Download example.mws

 

Regards,

Georgios Kokovidis

Dräger Medical

See ?spacecurve and  ?Student[VectorCalculus][TangentVector].  Below is an example without Student[VectorCalculus][TangentVector].  You can use this as a starting point for your own curve.

restart:with(plots):with(VectorCalculus):

r:=t-><sin(t),cos(t),sqrt(t)>;

(1)

diffrt:=unapply(diff(r(t),t),t);

(2)

spc:=spacecurve([seq(r(t)[n],n=1..3)],t=0..10*Pi,numpoints=1000,thickness=5,color=black):

display(spc,seq(arrow(r(30/40*n),diffrt(30/40*n),shape=arrow),n=1..40),color=red,orientation=[-102,64,-54]);

 

Download spacecurvewitharrow.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

 

 

restart:with(LinearAlgebra):with(plots):

data:= Matrix([[1, 2, 3], [2, 3, 4],[4,5,6],[6,7,8]]);

(1)

ans:=Column(data, [1..3]);

(2)

p1:=plot(Vector([seq(1..4)]),ans[1], style = line, color = blue):

p2:=plot(Vector([seq(1..4)]),ans[2], style = line, color = red):

p3:=plot(Vector([seq(1..4)]),ans[3], style = line, color = green):

display(p1,p2,p3);

 
 

 

Download matrixplot.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

See ?plots/animate for more details.  Change frames= to a high value, and this will slow down the animation.

For example:

animate(plot,[A*x^2,x=-4..4],A=-3..3,frames=100);

 

Regards,

Georgios Kokovidis

Dräger Medical

If the example below is similar to what you are looking for, see ?textplot and ?display

The use of labels = ["",""] will remove the "x" label from the x-axis.

 

restart:with(plots):

p1:=plot(cos((Pi*x)/2),x=-1..1,labels = ["",""]):

p2:=textplot([0, -.05, typeset("-a             a"), font = [TIMES, BOLD, 20]]):

display(p1,p2);

 

  

 

Download textplot.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

First 18 19 20 21 22 23 24 Last Page 20 of 75