janhardo

335 Reputation

8 Badges

11 years, 7 days

MaplePrimes Activity


These are questions asked by janhardo

To do this there should be a plotoption grid[ ], but probably obselote ?
Task (7) ask to plot the curve in rectangle [-,2,2]x[-4,5] : what rectangle?

Try using the Plotbuilder ( )command too( this generates also code )  and  interactive plotbuilder
Plotting this portion of curve in rectangle is not working yet.

ex_set_2_task_7.mw

I did two attempts with different ideas
 

 

restart;

Task (a) A list of numbers in Maple :

L:=[1,2,3,4,5];

[1, 2, 3, 4, 5]

(1)

 

In general summing up numbers sum(a, i = k .. n) = sum(a_i, i = 1 .. 5) and sum(a_i, i = 1 .. 5) = a1+a2+a3+a4+a5

underscript? ..i like to write a with underscore n : how to that

#S:={seq(L[i],i=1..5)};

#L:= [seq(L[i],i=1..5)];

For summing up numbers in a list of L i can use a ...

Sumlist := proc (L,N):  

Sumlist:=proc(L,N)

   a:=1;

   for i from 1 to N do

      a:=seq(L[i],i=1..5);

   end do;

end proc:

 

Warning, (in Sumlist) `a` is implicitly declared local

 

Warning, (in Sumlist) `i` is implicitly declared local

 

L:=[1,2,3,4,5];

[1, 2, 3, 4, 5]

(2)

N:=3;

3

(3)

Sumlist(L,N);

1, 2, 3, 4, 5

(4)

 

And now to sum the number sequenze  from the procedure?

 

restart;

Sumlist:=proc(L,N)

   a:=1;

   for i from 1 to N do

      a:=seq(L[i],i=1..5);
      #sum(a, i=1..5); # for this probably a second do loop nested ?

   end do;

end proc:

 

Warning, (in Sumlist) `a` is implicitly declared local

 

Warning, (in Sumlist) `i` is implicitly declared local

 

L:=[1,2,3,4,5];

[1, 2, 3, 4, 5]

(5)

N:=3;

3

(6)

Sumlist(L,N);

1, 2, 3, 4, 5

(7)

 

 

 

 

========================================================================

Also possible by? : a1 = 1, a2=a1+1, a3=a2+1, etc

restart;

 

Sumlist:=proc(L,N)

   a:=1;

   for i from 1 to N do

      a:=L[i]+1;

   end do;

end proc:

 

Warning, (in Sumlist) `a` is implicitly declared local

 

Warning, (in Sumlist) `i` is implicitly declared local

 

L:=[1,2,3,4,5];

[1, 2, 3, 4, 5]

(8)

N:=2;

2

(9)

Sumlist(L,N);

3

(10)

L[1];

1

(11)

 

Try some things out, but summing up list ?


 

Download betounes_ex_set_2_task_5.mw

 

Seems to make no difference with or without RETURN() for the procedure ?

 

vraag_op_forum_gesteld_over_boek_vb_binomium.mw

 

For to know what each graph is standing for in the plot legenda

Could not yet get it  in y , y' , y '' , to 5th derative 

Better is perhaps to have vertical table with the names and function expression together , but that could be difficult betounes_ex_set_task_4def.mw  

 

f := x -> exp(-x)*sin(x); intvx:= 0..3;
f := proc (x) options operator, arrow; exp(-x)*sin(x) end proc
intvx := 0 .. 3

 

And this one below ( i prefer this one ) , but got in worksheet now the one above
Probably a option issue ?

 

 

f := x -> exp(-x)*sin(x); intvx:= 0..3;

proc (x) options operator, arrow; exp(-x)*sin(x) end proc


 
First 14 15 16 17 18 Page 16 of 18