MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Hi EveryOne!

In the the answer of the question "How to find k^th root of the given matrix over finite field (at URL: http://www.mapleprimes.com/questions/203997-How-To-Find-Kth-Root-Of-The-Given-Matrix#comment215683). Carl Love helped to find k^th root of the given matrix M over GF(2m)/f(x).

Now, I need to compute direct exponentiation of the given matrix M in finite field. (If M = [mi,j], we say Direct Exponent (element-wise exponent matrix), Mdk of M is a matrix whose each element is the result of exponentiation of corresponding elements of M. If k=2, then we say Md2 is a direct square matrix of M )

Please help me!!! Thank you very much.

I've seen a few maple presentations where a block of code is wrapped in a box. Does anyone know how this is done?

 

Hi, I'm trying to solve a system of equation and I keep getting this error. Could anyone help me figure out what I'm doing wrong?

My problem is:

> alpha := .3; G := 3.5; L := 6; f := 1.1;

for i to 50 do

I0 := x(z)+y[i](z); ICon := x(0) = 1, y[i](0) = 0;

for j to 50 do

i <> j;

d1 := diff(x(z), z) = -G*x(z)*y[i](z)/IC-alpha*x(z);

d2 := diff(y[i](z), z) = G*y[i](z)*y[j](z)/IC-alpha*y[i](z);

dsys := {d1, d2};

F := dsolve({ICon, op(dsys)}, [x(z), y[i](z)], numeric);

end do;

end do;
Error, (in dsolve/numeric/process_input) unknown y[2] present in ODE system is not a specified dependent variable or evaluatable procedure


 

Hi,

When I calculate the nullspace of a Matrix my solution comes out in a different order than Maple.  So, the question is what steps does Maple use to calculate Nullspace, ColumnSpace, and eigenvalues.  All of these are calculated by Maple in a different order that when I calculate by hand.

What I meant to say is that the answer given by for nullspace is in a different order than if I were do the same calculation by Hand.   

A=<<[1,1,1,1],[1,2,3,4],[4,3,2,1]>>   this is what got calculating the Nullspace by hand <1,-2,1,0>,<2,-3,0,1>  when Maple does the calc. It returns the answer in the opposite order

 

Thanks

Bill

Hello, 

     I an trying to plot a function of a single variable, which is an implicit function of another variable, i.e. I want to plot F(x(t)), given that x and t are related through the implicit constraint equation f(x,t) = 0. Is there any plot stuctures in Maple that would easily let me do this? I tried implicit plot but this seems insufficient. 

     As an example, consider plotting F = x + x^2 subject to f = x + sin(x) + ln (t) = 0. I could also write this as  a function subject o a differential constraint, as is f = diff(x(t), t) + 1/t + (diff(x(t), t))*cos(x(t)) = 0 and try to use some sort of implicit DE plotting routine. 

     Any ideas?

Thanks!

I am running Maple in a windows virtual machine, on a mac computer.

I have a number of worksheets on its disk

Windows advised me to run its error checking utility (chkdsk)

when I try and open them it gives me a number of options:

maple text

plain text 

and maple input

 

None of these are the same as the original files. What has happened? and how can i fix it?



I have a list L:={1,2,3,4,5,6,7,8}. I choose three elements from list L. How many different combinations of three numbers can be selected from L so that the numbers could represent the side lengths of a triangle?

Hi all,

Thanks for helping me to solve the problem below using Maple.

dsys := {(1-4*(diff(ln(v(z)), z)))*(diff(u(z), z))+((3/2)*z^{-1}-2*(3* z^{-1} *(diff(ln(v(z)), z))+2*(diff(ln(v(z)),z,z )))))*u(z) = 0, -z*(diff(v(z), z))-v(z)+v(z)^(1/2)*u(z) = 0, v(0) = 1, u(0) = 1, (D(v))(0) = 1/4, (D(u))(0) = 3/8}

When trying    sol := dsolve(dsys, numeric)

I got : Error, (in DEtools/convertsys) unable to convert to an explicit first-order system.

 

Note that the analytic solution for z<=0 is:

if z>-4   then  u(z)=(1+z/4)exp(z/8) and   v(z)=exp(z/4)

else u(z)=0  and v(z)= (-4/z)exp(-1)

Regards

can anybody help me? i want to check the consistency of my scheme. My equation is too long if i check manually, so i used maple 13 to simplify my equation. But it cannot simplify it because of length of output exceed limit 1000000

restart

eqn1 := u+(1-exp(-m))*u[t]+(1-exp(-m))^2*u[tt]/factorial(2)+(u-(1-exp(-m))*u[t]+(1-exp(-m))^2*u[tt]/factorial(2))-u-(1-exp(-m))*u[x]-(1-exp(-m))^2*u[xx]/factorial(2)-u+(1-exp(-m))*u[x]-(1-exp(-m))^2*u[xx]/factorial(2)+(1-exp(-m))^2*u+(1-exp(-m))^2*u^3-(1-exp(-m))^2*(4*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+(t+1-exp(-m)))-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+(t+1-exp(-m)))+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+(t+1-exp(-m)))^3))*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)/((((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+(t+1-exp(-m)))-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+(t+1-exp(-m)))+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+(t+1-exp(-m)))^3)*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3+(x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)+(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+(t+1-exp(-m)))-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+(t+1-exp(-m)))+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+(t+1-exp(-m)))^3+(x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3));

(1-exp(-m))^2*u[tt]-(1-exp(-m))^2*u[xx]+(1-exp(-m))^2*u+(1-exp(-m))^2*u^3-(1-exp(-m))^2*(4*((x+1-exp(-m))^2-2)*cosh(x+2-2*exp(-m)+t)-16*(x+1-exp(-m))*sinh(x+2-2*exp(-m)+t)+4*(x+1-exp(-m))^6*cosh(x+2-2*exp(-m)+t)^3)*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)/((((x+1-exp(-m))^2-2)*cosh(x+2-2*exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+2-2*exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+2-2*exp(-m)+t)^3)*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3+(x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)+(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+2-2*exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+2-2*exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+2-2*exp(-m)+t)^3+(x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3))

(1)

a := simplify(eqn1);

`[Length of output exceeds limit of 1000000]`

(2)

``


Download consistency_expmle_4.mw

.


"the set Q of rational numbers does not have the least-upper-bound property under the usual order. "

Proof:

"Consider the part A = {x in `&Qopf;`; 1<x^(2)<2<}, this part is not empty as [4/(3)]  in A; It is bounded by 2 as if x^(2)<4 then x<2. THe set of greatest elements of A, belonging to `&Qopf;`, is not empty."

Lemma:

"If [p/(q)]  in A with q  in `&Nopf;`^(*), then p>q for p>0 and p^(2)-2*q^(2)<0; or p^(2)-2*q^(2) in `&Zopf;`, thus"

p^2-2*q^2 <= -1

p^2-2*q^2 <= -1

(1)

"for all r  in `&Nopf;`^(*), put y=(r*p+1)/(r.p), we have :"

y > p/q

Now:

"y^(2)-2=supA/(r^(2)*q^(2)), with supA= r^(2)*p^(2)+2 r*p+1-2 r^(2)q^(2),"

otherwise; -1; s = r(p^2-2*q^2)+2*p+1

s = r(p^2-2*q^2)+2*p+1

(2)

"a good choice for r, for instance r=2*p+1, we get from (1)"

(2*p+1)(p^2-2*q^2) <= (2*p+1)(-1)

2*p(p^2-2*q^2) <= 2*p(-1)

(3)

thus:

(2*p+1)(p^2-2*q^2)+2*p <= -1

2*p(p^2-2*q^2)+2*p <= -2

(4)

(2*p+1)*[(2*p+1)(p^2-2*q^2)+2*p] <= -2*p-1

(2*p+1)*[2*p(p^2-2*q^2)+1+2*p] <= -2*p-1

(5)

(2*p+1)*[(2*p+1)(p^2-2*q^2)+2*p]+1 <= -2*p

(2*p+1)*[2*p(p^2-2*q^2)+1+2*p]+1 <= -2*p

(6)

"finally, supA<0"

`and`(thus*y^2 < 2, `in`(y, A*with*y^2) and A*with*y^2 > 1)

"so, for any x  in p/(q) in A, there exists y  in A such that y>x: in conclusion A does'nt admit a greatest element."

Now, given*m = p/q, `and`(not `in`(Typesetting:-delayDotProduct(a*greatest*element*of*A, Then)*m, A), we*get*thus):

`and`(p > q, p^2-2*q^2 >= 0)

as*the*equation*p^2-2*q^2 = (0*has)*no*solutions and `in`((0*has)*no*solutions, nonnegint*nonnegint), we*get:

2*p^2-2*q^2 >= 1:

"for any r  in `&Nopf;`^(*)let's put m'=(r*p)/((r*q+1)); we have:"

(diff(m(x), x))^2-2 = supA/(r*q+1)^2:

With*supA = r^2*p^2-2*(r*q+1)^2 and r^2*p^2-2*(r*q+1)^2 = r[r[p^2-2*q^2]-4*q]-2:

"for a good choice of r, for example r=4*q+1, we get (back to (2)):"

supA > (0*thus)*(diff(m(x), x))^2 and (0*thus)*(diff(m(x), x))^2 > 2:

"So, for any greatest element m of A, it exists m', greatest element of A such as:"

diff(m(x), x) < m(x):

"A does not admit a least upper bound."

``


Download rational_numbers.mw

"the set Q of rational numbers does not have the least-upper-bound property under the usual order. "

Proof:

"Consider the part A = {x in `&Qopf;`; 1<x^(2)<2<}, this part is not empty as [4/(3)]  in A; It is bounded by 2 as if x^(2)<4 then x<2. THe set of greatest elements of A, belonging to `&Qopf;`, is not empty."

Lemma:

"If [p/(q)]  in A with q  in `&Nopf;`^(*), then p>q for p>0 and p^(2)-2*q^(2)<0; or p^(2)-2*q^(2) in `&Zopf;`, thus"

p^2-2*q^2 <= -1

p^2-2*q^2 <= -1

(1)

"for all r  in `&Nopf;`^(*), put y=(r*p+1)/(r.p), we have :"

y > p/q

Now:

"y^(2)-2=supA/(r^(2)*q^(2)), with supA= r^(2)*p^(2)+2 r*p+1-2 r^(2)q^(2),"

otherwise; -1; s = r(p^2-2*q^2)+2*p+1

s = r(p^2-2*q^2)+2*p+1

(2)

"a good choice for r, for instance r=2*p+1, we get from (1)"

(2*p+1)(p^2-2*q^2) <= (2*p+1)(-1)

2*p(p^2-2*q^2) <= 2*p(-1)

(3)

thus:

(2*p+1)(p^2-2*q^2)+2*p <= -1

2*p(p^2-2*q^2)+2*p <= -2

(4)

(2*p+1)*[(2*p+1)(p^2-2*q^2)+2*p] <= -2*p-1

(2*p+1)*[2*p(p^2-2*q^2)+1+2*p] <= -2*p-1

(5)

(2*p+1)*[(2*p+1)(p^2-2*q^2)+2*p]+1 <= -2*p

(2*p+1)*[2*p(p^2-2*q^2)+1+2*p]+1 <= -2*p

(6)

"finally, supA<0"

`and`(thus*y^2 < 2, `in`(y, A*with*y^2) and A*with*y^2 > 1)

"so, for any x  in p/(q) in A, there exists y  in A such that y>x: in conclusion A does'nt admit a greatest element."

Now, given*m = p/q, `and`(not `in`(Typesetting:-delayDotProduct(a*greatest*element*of*A, Then)*m, A), we*get*thus):

`and`(p > q, p^2-2*q^2 >= 0)

as*the*equation*p^2-2*q^2 = (0*has)*no*solutions and `in`((0*has)*no*solutions, nonnegint*nonnegint), we*get:

2*p^2-2*q^2 >= 1:

"for any r  in `&Nopf;`^(*)let's put m'=(r*p)/((r*q+1)); we have:"

(diff(m(x), x))^2-2 = supA/(r*q+1)^2:

With*supA = r^2*p^2-2*(r*q+1)^2 and r^2*p^2-2*(r*q+1)^2 = r[r[p^2-2*q^2]-4*q]-2:

"for a good choice of r, for example r=4*q+1, we get (back to (2)):"

supA > (0*thus)*(diff(m(x), x))^2 and (0*thus)*(diff(m(x), x))^2 > 2:

"So, for any greatest element m of A, it exists m', greatest element of A such as:"

diff(m(x), x) < m(x):

"A does not admit a least upper bound."

``


Download rational_numbers.mw

This problem has real world applicability: Three vampires and three maidens are at the foot of a tall building and wish to get to the bar on the top floor.  The lift only holds two people (for convenience I am classing vampires as people), and needs one person to operate it.  If ever the vampires outnumber the maidens at any place, they will do something unspeakable.  How can the vampires and maidens all safety get to the top in the minimum of moves?  http://tonysmaths.blogspot.com.au/2012/05/vampires-and-maidens-problem.html

can this be solved procedurally or using optimization package?

possible manual soln:

No. m>= No. v

3m+3v, 0   [0]

2m+2v,m+v [1]

3m+2v,v  [2]

     3m, 3v [3]

3m+v , 2v  [4]

m+v  , 2m+2v [5]

#then reverse the steps

2m+2v, m+v [6]

       2v, 3m+v [7]

       3v, 3m  [8]

        v , 3m+2v [9]

    m+v, 2m+2v [10]

        0, 3m+3v [11]

 

I'm looking at Maple as a possible alternative to Mathcad (which I've been using for years, but is now very jaded compared to other options like Maple and Mathematica).  I'm a civil engineer and for what I do, one of the better features of Mathcad is the way it handles units.  For example, if I specify an angle in degrees (say phi=30 degrees) and then ask for sin(phi), I get 0.5.  At face value, I though Maple would do the same kind of thing.  However, this doesn't appear to be the case (see attached worksheet).  The only workaround that I can see is to specify the angle in degrees (but without assigning ) and then multiply the specified value by pi/180 (to convert to radians) before passing it to the sin function.  Which is all a bit messy and not at all an attractive solution.

Am I misunderstanding the way units work in Maple and is there a clean way of specifying angles in degrees (which is what engineers work with) and using these values directy in trig functions?

Thanks in anticipation,

Ian

If a dosage Q units of a certain drug is administrated to an individual, then the amount remaining in the bloodstream at the end of t minutes is given by Q*exp^-ct, where c>0. Suppose this same dosage is given at successive T-minute intervals.

 

a) Show that the amount A(k) of the drug is given by A(k) = ∑n=0k-1 Q*exp(^-ncT).

b) Find an upper bound for the amount of the drug in the bloodsteam after any number of doses.

c) Find the smallest time between doses that will ensure that A(k) does not exceed a certain level M for M>Q.

What is the right syntax to solve :

min {sum(i=1 to 10) sum(j=1..10) (a_i_j)*(x_i)*(x_j) 

s.t sum(i=1..n) (b_i)*x_i=p and sum(i=1..n)x_i=1 

if a_i_j is a constant, b_i is a constant, p is a constant and x_i, x+j are the decision variables?

I understand that this is a quadratic programming problem and an application of Markowitz optimization. I've tried to use the in-built minimize function but haven't got the right output.

I am very new to Maple and am wondering how i would install a package. The package I am trying to install is located at

http://math.rutgers.edu/~russell2/papers/IdentityFinder 

I am using Maple 2015 on windows 8. Any advice would be useful

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