Items tagged with sequence sequence Tagged Items Feed

restart:
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=2..6);
dseq:=seq2-seq1;
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=1..5);
dseq:=seq2-seq1;
seq1:=[seq(i,i=1..5)];
seq2:=[seq(i,i=1..5)];
dseq:=seq2-seq1;

Is that possible to get the differences between two sequences directly? (instead of using a list)

I don't quit understand why the second method would collapse the 0s into just a single value. It's not a set.

 

Thanks,

casper

I have a rank 1 array M of 1000 values.

I want to apply a function f on each value of M and its location giving,

[f(1,M[1]), f(2,M[2]), ... , f(1000,M[1000])]

is it possible to get this using map or map2 or map[n] or maptype (without using seq since its slowing down computation).

inotherwords can i access the member location inside a map evaluation?

Hello Hello everybody 
   I have to solve the following differential equation numerically 


``

 

restart:with(plots):

mb:=765 : mp:=587 : Ib:=76.3*10^3 : Ip:=7.3*10^3 : l:=0.92 : d:=10: F:=490: omega:=0.43 :

eq1:=(mp+mb)*diff(x(t),t$2)+mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(theta(t),t$2)+mp*l*cos(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*sin(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*sin(alpha(t)+theta(t)))-F*sin(omega*t)=0;

1352*(diff(diff(x(t), t), t))+587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(theta(t), t), t))+540.04*cos(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*sin(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*sin(alpha(t)+theta(t))-490*sin(.43*t) = 0

(1)

eq2:=(mp+mb)*diff(z(t),t$2)-mp*d*(sin(theta(t)+alpha(t))+sin(theta(t)))*diff(theta(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*cos(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*cos(alpha(t)+theta(t)))+9.81*(mp+mb)-F*sin(omega*t)=0;

1352*(diff(diff(z(t), t), t))-5870*(sin(alpha(t)+theta(t))+sin(theta(t)))*(diff(diff(theta(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*cos(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*cos(alpha(t)+theta(t))+13263.12-490*sin(.43*t) = 0

(2)

eq3:=mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(x(t),t$2)-mp*(l*sin(theta(t)+alpha(t))+d*sin(theta(t)))*diff(z(t),t$2)+(Ip+Ib+mp*(d^2+l^2)+2*mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+[Ip+mp*l^2+mp*d*l*cos(alpha(t))]*diff(alpha(t),t$2)-mp*sin(alpha(t))*(l*d*diff(alpha(t),t)^2-l*d*(diff(alpha(t),t)+diff(theta(t),t))^2)+mp*9.81*l*sin(alpha(t)+theta(t))+mp*9.81*d*sin(theta(t))=0;

587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(x(t), t), t))-587*(.92*sin(alpha(t)+theta(t))+10*sin(theta(t)))*(diff(diff(z(t), t), t))+(142796.8368+10800.80*cos(alpha(t)))*(diff(diff(theta(t), t), t))+[7796.8368+5400.40*cos(alpha(t))]*(diff(diff(alpha(t), t), t))-587*sin(alpha(t))*(9.20*(diff(alpha(t), t))^2-9.20*(diff(theta(t), t)+diff(alpha(t), t))^2)+5297.7924*sin(alpha(t)+theta(t))+57584.70*sin(theta(t)) = 0

(3)

eq4:=mp*l*cos(alpha(t)+theta(t))*diff(x(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(z(t),t$2)+(Ip+mp*l^2+mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+(Ip+mp*l^2)*diff(alpha(t),t$2)-mp*9.81*l*sin(alpha(t)+theta(t))+l*d*mp*diff(theta(t),t$1)^2*sin(alpha(t))=0;

540.04*cos(alpha(t)+theta(t))*(diff(diff(x(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(z(t), t), t))+(7796.8368+5400.40*cos(alpha(t)))*(diff(diff(theta(t), t), t))+7796.8368*(diff(diff(alpha(t), t), t))-5297.7924*sin(alpha(t)+theta(t))+5400.40*(diff(theta(t), t))^2*sin(alpha(t)) = 0

(4)

CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;

x(0) = 0, z(0) = 0, theta(0) = 0, alpha(0) = 0, (D(x))(0) = 0, (D(alpha))(0) = 0, (D(z))(0) = 0, (D(theta))(0) = 0

(5)

solution:=dsolve([eq1,eq2,eq3,eq4, CI],numeric);

Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

 

 

I don't know why it says : Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

Help pleaase!

thank you !!!

Download systéme_complet.mw

 

the meaning of []...

May 12 2014 taro 90

Hello Those who are in Mapleprimes.

 

I want to know the meaning of [].

That is,

a:=[1,2,3];

b:=a[];

What were returned was 

b:=1,2,3

This result is the same as that obtained from

b:=op(a);

 

What kind of meaning does a[] have?

I want to know the logic of this expression.

Can I ask you about this?

Thank you in advance.

 

taro yamada 

 

 

 

 

 

I'm trying to run two statement sequences, one after the other, numerous times. I have the statement sequences:

 

>for j from 1 to N do

>S[j]:=V[j]+t;

>S[j]:=S[j]+3;

>end do:

 

>for j from 1 to N do

>if S[j]>99 then S[j]:=0

>end if:

>end do:

 

 

I can manage to run one of them multiple times, but when I try to encompass both of them within my 

 

>for counter from initial to final do statementsequence

end do:

 

it doesn't seem to work.

 

Thanks in advance

Is it possible to display each element of a sequence on a new line?

The default behaviour, obviously, is to display each element on the same line separated by commas, and wrapping to a new line as required by screen space. This is somewhat unsightly when the elements of the sequence contain long equations or expressions, and impacts readability because the commas don't stand out as effective separators between elements.

For example:

B := b=2;

C := c=3;

A := B,C;

>A

b=2, c=3

 

Is there a way to display each element on a new line?

For example:

>A

b=2,

c=3

 

Is there another data type or a simple expression that could achieve this effect?

The following limit does not return a value. Then the evalf gives a wrong answer.

The answer should be "undefined" or -infinity .. infinity.

limit(exp(n)/(-1)^n, n = infinity) assuming n::posint; evalf(%);


                       /exp(n)              \
                  limit|------, n = infinity|
                       |    n               |
                       \(-1)                /

                               0.

The same happens if you delete the assumption.

 

A similar problem occurs with

limit(sin(Pi/2+2*Pi*n), n = infinity) assuming n::posint;
                            -1 .. 1
without the assumption this would be appropriate.

How to find 2013th term in the sequence 

1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...?

in which the n-th positive integer appears n times. 

I don't know how to start.

Need help with starting this question. Thanks!

If a sequence is defined by X0=0, X1=1, X2=2 and Xn=n(Xn-3+Xn-2+Xn-1), n>=3

How many digits will X2013 have?

I'm having problem dealing with this question on Maple and would appreciate any help possible.

If f(x) = x/2, if x is even
   f(x) = 3x-1, if x is odd

which sequence will 2013^1102 fall in
1->1->1...
5->7->5...
17->25->37->55->41->61->91->17...

Thanks!


Dear Maple forum,

 

given A, B real numbers,

and after defining the recurrent sequence

 

x(0) = A

x(n) = 0.5* x(n-1)^3 + B

 

I would like to see a graphic of x(n) on the plane x(n) - n.

how could I implement in maple 16?

 

thank you for your help.

 

JeanJ

I have this sequence:

 D[n] = (Sum((n-k)/(k+1),k = 0 .. n-1)-ln(n!))/n;

How can I put  this in maple, assess if it converges or not and if it is possible, calculate the limit to infinity.

 

Thanks

I'm very new to Maple and can't figure out how to do this:

I have these possibilities:

for 1 - [1],[2],[3]

for 2 - [1,2],[2,1],[1,3],[3,1],[2,3],[3,2]

for 3 - [1,2,3],[2,3,1],[3,1,2],[3,2,1],[2,1,3],[1,3,2]

and I want to find all the possible combinations when they are in, say, the order of [3,2,1]

eg.

[[1,2,3],[1,2],[1]],

[[1,2,3],[1,2],[2]],

[[1,2,3],[1,2],[3]], 

[[1,2,3],[2,1],[1]]

Hello,

I have created a test document to check an equation and I would like to feed a range of k values (ranging from 0 to say 512) in increments of 1) to the main function, and then plot the result as a graph of Zuncomp (y-axis) vs k(x-axis).

I can verify the values of the function by typing say Zuncomp(0) or Zuncomp(10) etc but how do you run this so that you do Zuncomp(k) to read all values of k and generate the output to plot?

Using Maple 13 (Windows 7...

1 2 3 Page 1 of 3