MaplePrimes Questions

Hi, I am currently creating a procedure so that i can input two matrices and a vector and multiply them together in different patterns, I want the result to be either one of the vectors {4,0,0,0} or {0,4,0,0} or {0,0,4,0} or {0,0,0,4}, I am trying to create an if loop that says is one of the S's is equal to one of these print ("Synchronising"), I have decalred these vectors inside the procedure and all the S's but my if statement is still not working. I think S needs to be decalred more clearly inside but i'm unsure what to do, any help would be much appreciaited! Here is my procedure:

 

proc_cerny1:=proc(A::Matrix,B::Matrix,C::Vector)
local s, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, e, f, g, h;
s:=C.A;
s1:=C.B;
s2:=C.A.B;
s3:=C.B.A;
s4:=C.A.A;
s5:=C.B.B;
s6:=C.A.A.A;
s7:=C.B.B.B;
s8:=C.A.B.B;
s9:=C.A.B.A;
s10:=C.B.B.A;
s11:=C.B.A.A;
s12:=C.A.A.B;
s12:=C.B.A.B;
s13:=C.B.A.A;
s14:=C.B.A.A.A;
e:=Vector([4,0,0,0],orientation=row);
f:=Vector([0,4,0,0],orientation=row);
g:=Vector([0,0,4,0],orientation=row);
h:=Vector([0,0,0,4],orientation=row);
g:=Vector([0,0,4,0],orientation=row);
if (s7 = e)then
print("Synchronising")
elif (s7 = g) then
print ("Synchronising")
elif (s7 = h) then
print ("Synchronising")
elif (s7 = g) then
print("Synchronising")
else
print("Not Synchronising");
end if;

return s, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14;
end proc:

 

Thanks 

Dears 

I want to sum some series by Maple and plotting. The problem is the sum of series are known like

serer.pdf

the problem is the difference between two graphs at the intersection x-axis and y-axis.

Is there any solution for this problem.

Amr

Hi,

I m trying to substitute numerical values to an expression having assumed parameters, like m should be integer, a>0, but i could not do it.

i could not attach the .m file from which i am reading my expression, but i m attaching the file in which i m reading the expression, and you can see i could not assign values to parameters.

Regards

Sunitquestion.mw

[A restatement, from my memory, of the essential detail of the original, deleted, question.--Carl Love as moderator]

1) a) Compute a primitive 4th root of unity modulo 29. Note that the command numtheory:-rootsofunity(p,r) will not work for this.

1) b) Compute the inverse of the root found in (a).

2) Letting omega be the root found in 1 (a), compute the matrix of the Discrete Fourier Transform DFT[omega] and the matrix of the inverse transform DFT[omega^(-1)]. Show that the product of these matrices is 4I (I being the identity matrix).

"Circular segment" is the unfortunate but standard term for the region between a chord and an arc of a circle sharing the same endpoints (see http://en.wikipedia.org/wiki/Circular_segment).  I say "unfortunate" because the phrase suggests a line segment when it actually means a planar region.

I would like to plot a shaded circular segment using Maple17.  I want the endpoints of the chord & arc to be anything I please, so the chord is not necessarily horizontal, or vertical, or the diameter of the circle, etc.

At the URL

http://www.mapleprimes.com/questions/139057-Segment-Of-A-Circle

there is an image containing a shaded circular segment, but I don't see what code produced the image.  The image there includes a horizontal chord, and I don't know if the code used to produce that image can be adapted for chords that are not horizontal.

If I have to, I can plot a shaded polygon with a huge number of sides that is indistinguishable from a circular segment.  I have plotted polygons before.  But it would obviously be preferable to plot a shaded circular segment.

If there a way to plot two curves of the form r = f(theta) and shade the region between them?  This would be better than the huge-polygon approach, but not as good as a simple command for plotting a shaded circular segment, if such a command exists.

[A restatement of the essential details of the original, deleted, question from my memory.--Carl Love as moderator]

1) Compute the square root of 2 mod 3^8.

2) Compute the cube root of 2 mod 625.

I am trying to work with a for do loop with a while component. I have the error but I am not sure what the desired error should be. I know it has to be small but how small?

 

Thanks

I have noticed that Maple's command isolve doesn't always seem to work for me. An example would be solving

x^2 + y^2 +z^2 =3 over the integers. Maple does not return any solutions.

I have found that isolve work for two variables, so I have just been iterating the third variable and applying isolve. However what if I want to solve  something with negative coefficients like : x^2 +y^2 +2*z^2 +x*y -y*z, then I have to be careful about which variable I iterate and the bounds are not always obvious.

Is there an easy fix to solve a homogeneous degree 2 polynomial in three variables over the integers ? Thanks!

Please have a visit of this qestion `http://math.stackexchange.com/q/574843/8581`. I did a very elementary attempt there for example for a function:

 > with(plots):
      h := x->piecewise(x < -2, x+3, x <= 2, 5-x^2, 3-x):
      t:=x->h(-x):
      a:= plot(h(x), x = 0 .. 10, color = red, thickness = 3):
      b:= plot(t(x), x = -10 .. 0, color = green, thickness = 3):
      display(a,b);

But  I am eager to know  the formal codes if they exists. Thanks for your time.

First I know that the Newton-Raphson formula gives N(z)=z-(f(z))/(f'(z)). If f(z)=z^+1, then N(z)=(z^2-1)/2z

 

Then the Question asks me to first define two important functions which I did:

1)T(z)=z-i/z+i where is i is imaginery number, 2)N(z)=z^2-1/2z. Hence, I wrote the following in maple:

>T:=z->(z-i)/(z+i)

>N:=z->(z^2-1)/(2z)

Then I was asked to show that T(N(z))=(T(z))^2, so I wrote the following commands:

>z:=2

>T(N(z))-(T(z))^2 (I got zero for their difference, so they are equal)

next, the question said the same wave verify that T(N^2(z))=(T(z))^4, so i wrote:

>T(N^2(z))-(T(z))^4 (but I got 0.3239121662-1.392199407I which is a complex number, not zero but WHY?)

and the rest of the questions are as follow:

1) What will be the general result? <-I don't what does it mean by general result :S

2) T(N^k(z)) will be what power of T(z)? <-Is it power of 2k?I have no ideas.

3) Try T(N^3(z)).<-which I know that T(N^3(z))=T(N^2(N(z))), so does T(N^2(N(z)))=(T(z))^6 then?

 

It would be appreciated If anyone could help me with this/clear up my confusion with questions. thanks.

 

 

 

I have a statistics task that is very complicated to me, and I would really appretiate some help!

I believe that I have completed task a, but task b and c seems to be too hard for me to grasp.

Here is a presentation of the task text:

 

xi 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
yi 12.3 12.8 16.8 17.9 20.5 22.7 24.9 27.5 26.9 29.4 30.3 34.2 36.4 36.7 41.1

Assume that the data represents independent realizations of a "linearlnormal" model.

Yi = α + β xi + ei i = 1..15,

where ei˜N(0,σ), where sigma is unknown.

 

(a) create a scatterplot of the data {f(xi,yi)}15 ; i=1
Then calculate the empiric correlation coefficient.

(b) Find the minimum least square estimate for α & β.

(c) Create a 95% confidence interval for the parameter β. What does this confidence interval express?

Is there anyone out there who are able to help me with some maplecode?


thanks in advance,

Soeta

I was successful in getting the Maple add-in to load into Excel 2013 but the help file accessed in the Add-In Ribbon is not found.  Does anyone know where in Excel that file can be loaded?

I've been given a question:

Let pn denote the nth prime number. Then p1 = 2, p2 = 3, p3 = 5, p4 = 7, p5 = 11, . . . .

It is known that the infinite sum 1/p1 + 1/p2 + 1/p3 + · · · + 1/pn + · · · = infinity.

Find the smallest positive integer N so that 1/p1 + 1/p2 +1/p3 + · · · + 1/pN−1 + 1/pN > e. [Hint : ithprime(n) generates the nth prime number.]

How do I start off?

Many thanks!

Usually maple returns the behaviour about the expansion point, but now I get a series in terms of weird powers...

I think the behaviour is logarithmic, but thats not what maple reproduces.

What results in this behaviour of maple?

limitxkl.mw

restart; with(MultiSeries); assume(omega > 0, s > 0, s < 1); x := arctanh(sqrt((1-s)/(1+s))*tanh((1/2)*omega*t)); xinf := limit(x, t = infinity)

arctanh(((1-s)/(1+s))^(1/2))

(1)

y := solve(.9*xinf = x, t)

2.*arctanh(tanh(.9000000000*arctanh(((1.-1.*s)/(1.+s))^(1/2)))/((1.-1.*s)/(1.+s))^(1/2))/omega

(2)

y := 2*arctanh(sqrt((1+s)/(1-s))*tanh(.6*arctanh(sqrt((1-s)/(1+s)))))/omega

2*arctanh(((1+s)/(1-s))^(1/2)*tanh(.6*arctanh(((1-s)/(1+s))^(1/2))))/omega

(3)

series(y, s = 0)

23.71899812/omega-0.1319507911e11*s^.6000000000/omega+0.1000000000e11*s^1./omega+0.8705505636e20*s^1.200000000/omega-0.1319507911e21*s^1.600000000/omega-0.7657989038e30*s^1.800000000/omega+O(s^2.000000000)

(4)

NULL



Download limitxkl.mw

 

Hi there!

Maple has lot's of datatypes which are very related to each other, such as Matrices and Arrays, or sets, lists and vectors.

Most of the time I am not quite sure which type is the "right" one to use for me, and I guess for most of the stuff I have done so far it didn't really matter. However now I am going a bit into numerics, and there things can get big and computationally expensive. Also, recently I got an error message stating that I would assign a large list to a variable, and should rather use an Array instead. So I guess I should start to bother what to use. : )

Obviously the Matrix has some advantages to the Array in the sense that I can perform matrix calculations with it easier using the LinearAlgebra package. So it can be transposed and what not. But is it disadvantegeous to the Array in any way, especially when it comes to large matrices in numerical calculations?

The same would interest me for sets, lists and Vectors.

Cheers!

Gernot

First 1507 1508 1509 1510 1511 1512 1513 Last Page 1509 of 2434