Items tagged with homework homework Tagged Items Feed

Explore the values of km digit(n,m) using km list for all m, 0 ≤ m ≤ 8.
Look at the output until you can make a conjecture that concerns the pattern
obtained for each fixed m, 0 ≤ m ≤ 8 using 

km := proc (n::posint, m::nonnegint)

local k,

mySum := 0;

for k to n do

mySum := mySum+k^m

end do;

return mySum

end proc

using a list km list(m,6,20) when m is not a multiple of 4, and km list(m,6,50) when m is a multiple of 4.


any help appreciated..THank you


Need to create a fibonacci defintiion using this form..Any help appreciated..thanks in advance

The Fibonacci numbers Fn are defined for all positive integers n as follows:

Fn = ( 1,                 n =1, 2 , )    

      (Fn−1 + Fn−2 , otherwise.)

 Complete the definition of fib so that fib(n) returns Fn for all positive integers n. You must compute Fn using the below definition! A recursive proc is most natural.

description "Calculate fib(n), the n'th Fibonacci number.";
option remember; # important for efficiency!
end proc; # fib

I need to complete the definition of P km using a for loop so that km(n,m) returns n k=1 k m whenever n, m ∈ Z, n > 0, and m ≥ 0.( You must use a for loop in the variable k, with k ranging from 1 to n, to do this question in the manner requested.)

km is defined as 

description "km(n,m) returns the sum of k^m as k ranges from 1 to n.";
end proc; # km

Not sure where tostart..Any help appreciated...thank you

hello all!

Pascal := proc (n::posint)

local x, y, i;

 for i from 0 to n do print(coeffs(expand((x+y)^i)))

end do end proc;


1, 1
1, 2, 1
1, 3, 3, 1
1, 4, 6, 4, 1

 How to create 


1  1
1  2  1
1  3  3  1
1  4  6  4  1


hello everybody!

I want to create a random symmetric matrix which have det=2. I just made it like this, no better than those ones. Thanks!

Doixung := proc (n)

local A, i, j; A := Matrix(n);

n := LinearAlgebra[Dimension](A);

for i to n do A[i, i] := RandomTools[Generate](integer(range = 1 .. 20))

   end do;

for i to n do

     for j to n do

           while j < i do A[i, j] := RandomTools[Generate](integer(range = 1 .. 20)) end do;

           while i < j do A[i, j] := A[j, i] end do

     end do

end do;

print(A) end proc

Hello everbody.


 local i,p,f;   i:=1;

 while i<= N do      


     if abs(p-p[0])<TOL then             return p;     else i:=i+1;            p[0]:=p; end if;  

end do;

printf("The method failed after N iterations,N=%d",N);  end proc:

Hello! I have written a algorithm. Can you help me find errors? thank you very much. sorry, my English is not very good!

uses LA= LinearAlgebra;
local i, j, k, n:= LA:-RowDimension(A),
L:= Matrix(LA:-Dimensions(A));
for j from 2 to n do
end do;
for i from 2 to n-1 do
for j from i+1 to n do
end do;
end do;

Given the sequence defined by the recursive relation a[n+1] = r*a[n](1-a[n])
You need to use the procedure iterate.
Throughout this problem you should choose initial values in the interval 0<a0<1.
(a) Let r=3/2. Calculate a moderate number of terms in the sequence (between 10 and 20). Does the sequence appear to be converging? If so to what value? Does the limit depend upon your choice of initial value? Plot the terms you have calculated
(b) Let r=2.8. Calculate a moderate number of terms in the sequence (between 10 and 20). Does the sequence appear to be converging? If so to what value? Does the limit
depend upon your choice of initial value? Plot the terms you have calculated How does this sequence differ from that in part (a).
(c) Let r=3.2. Calculate a moderate number of terms in the sequence (between 10 and 20). Show that the sequence does not appear to converging. Plot the terms you have calculated and describe how the sequence behaves in this case.
(d) Consider intermediate values between 2.8 and 3.2 to determine more precisely where the transition in behaviour takes place. Provide a few plots (no more than 4) showing the values you have investigated.
(e) Consider the values of r in the range 3.43<r<3.46. Determine as accurately as you can the value of r for which the period of oscillation doubles.
(f) As r increase further period doubling occurs. Try to find the when the sequence appears to oscillate between 8 values.
(g) Let r =3.65 and calculate a considerable number of terms (at least a few hundred) and plot your values.
(h) For r=3.65 choose a0=0.3 and then a0=0.301. Find and plot some terms in the sequence for each initial value. Determine how long the terms in the two sequences remain close together and when they begin to depart significantly from each other.

Hello all! I've just learned about Maple. My English is not very good :( I write matrix A:=L*U program. If you know it, you will understand my mind. But I received "error" from Maple. Thanks for your viewing

hello eveyone! sorry, my English is not very good

I writed Neville algorithm

I want to creat a table(or a matrix) Q with



with value of X: -2,1,0,1,2

-2   1/4

-1    1/2

0    1

1    2

2     4

I want to approximate f at x=0.5 by Neville

then:   for i:=2,...,n   (that case is 5)

             for j:=2,...i




this is:

-2  1/4     0       0            0          0

-1  1/2     0.875  0           0           0

0  1         1.25   1.3475    0           0

1  2         1.5    1.4375   1.421875  0

2  4         1      1.375      1.40625  1.412109375

do you understand my mind? sorry, my English is not very good



Hey, I need to answer this question, not sure where to start..Any help/tips would be much appreciated....


Bob wants to explore the effect of changes in a, b and c on the function h, where h(x, y) = ∂ 2 /∂x∂y (ay sin(bx + c)). How should Bob do this so that if he redefines the variables a, b, or c later in the Maple session, subsequently computed function values h(x) use the new values of a, b, c?

we have a curve (x^2+y^2)^2=x^2-y^2

parametric representation of the curve is given by




and we are asked to plot the curve using a parametric plot for -Pi<t<Pi


how to solve lp  on maple when consrtaints are in interval 



 i try to find this on maple,but i could not found my desired ans.

i got an assignment in which 15 constraints are given and all are in interval.

anyone know the ans then plz help me

How many numbers exist which are: less than 1000, multiple of 18 and also multiple of 10? Use Maple to find the answer 

Hello everyone! My English is not very good. 

I have writtien Lucas sequence program:

F := proc (n::nonnegint)

option remember;

if n < 2 then n else F(n-1)+F(n-2) 

end if;

end proc;

L := proc (n::nonnegint)

if n = 0 then return 2 end if;

if n = 1 then return 1 end if;

if n <> 0 and n <> 1 then return

L(n-1)+L(n-2) end if; end proc;


 local i;  

for i from 1 by 1 to n do   S(i)=L(i)^(2)-5*F(i)^(2);

 print("%a",S(i));  end proc: 


And Maple notice :error

I don't know call procedure inside another procedure. 
Thank you so much



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