Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi I'm not really sure how to phrase this but I'm doing projectile motion and I'm try to graph the solutions for v_0 by theta_0.

According to Sphere Packing Solved in Higher Dimensions, the best way, i.e., most compact way, to pack spheres in dimensions 8 and 24 are done with the E8 lattice and Leech lattice, respectively. According to the Wikipedia article Leech lattice, the number of spheres that can be packed around any one sphere is 240 and 196,560 (!), respectively, the latter number of spheres counter-intuitively large. It inspired me to try to check that there is indeed room in these lattices for (at least) this number of spheres.

Starting with the E8 lattice: It is generated by the sum (over the integers) of all the 240 roots of E8. Following the prescription given in the subsection 'Construction' in the Wikipedia article E8 (mathematics), these roots may be constructed as follows:

ROOTS := map(x -> Vector(x),[
   # Coordinates all integers: 112 roots
   combinat[permute]([+1,+1,0,0,0,0,0,0])[],
   combinat[permute]([+1,-1,0,0,0,0,0,0])[],
   combinat[permute]([-1,-1,0,0,0,0,0,0])[],
   # Coordinates all half-integers: 128 roots
   seq(combinat[permute]([
      (+1/2)$(  2*n),   # Even number of +1/2
      (-1/2)$(8-2*n)    # Even number of -1/2
   ])[],n = 0..4)
]):

This Maple code gives a list of 240 eight-dimensional vectors. All these roots have the same length (the lattice thus being simply laced):

convert(map(x -> Norm(x,2),ROOTS),set)[];

If the distance between any pair of different roots is at least this length, then there will be room for 240 spheres of radius equal to this length around any one single sphere. And that is indeed the case:

DIST_ROOTS := Matrix(nops(ROOTS)$2,(i,j) ->
   Norm(ROOTS[i] - ROOTS[j],2)
,shape = symmetric):
min(convert(DIST_ROOTS,set) minus {0});

Using the above method for the Leech lattice will fail on grounds of hopeless performance, not the least because DIST_ROOTS will take ages to calculate, if at all possible. So any reader is welcome to weigh in with ideas on how to check the Leech lattice case.

PS: By the way, I was surprised to find that the three exceptional Lie algebras E6, E7, and E8 are seemingly not accessible through the Maple command SimpleLieAlgebraData, see its help page. Only the four infinite families A,B,C,D, as well as the two exceptional Lie algebras G2 and F4 are. Using Maple 17, I would like to know if that has been changed in Maple 17+, and if not, why not.

hi .why matrix a dont create?

bot.mw

psi := (1/4)*(1-Zeta)^2*(2+Zeta), (1/4)*(1-Zeta)^2*(Zeta+1), (1/4)*(Zeta+1)^2*(2+Zeta), (1/4)*(Zeta+1)^2*(Zeta-1)

(1/4)*(1-Zeta)^2*(2+Zeta), (1/4)*(1-Zeta)^2*(Zeta+1), (1/4)*(Zeta+1)^2*(2+Zeta), (1/4)*(Zeta+1)^2*(Zeta-1)

(1)

psi[1]

(1/4)*(1-Zeta)^2*(2+Zeta)

(2)

for i to 4 do for j to 4 do a[i, g] = 2*psi[i]*psi[j] end do end do

a

a

(3)

`a__1,1`

`a__1,1`

(4)

NULL

 

Download bot.mw

I want to solve system of non linear odes numerically.

I encounter following error

Error, (in dsolve/numeric/bvp) cannot determine a suitable initial profile, please specify an approximate initial solution

how to correct it

regards

In workbook mode I use the Insert>>Paragaph>>Before Cursor to create a text block. I just want to type text into this block by way of comments on what preceded/follows. However, when I type parentheses or <> of (I expect) other stuff that Maple recognises as being parts of mathematical expressions Maple switches to italic and bold and starts generally interefering with my text. In the case of my title I get the result in the picture below. Is there any way to stop Maple doing this so I can type text?

 

How I can solve it ? If I want a solution dependent of a. With fsolve? But how?

-x3+ax2-lnx=0
 

Hello,

I'm working in a project where I use the Java Open Maple library. I need to evaluate a procedure but with a very large number. In the function engine.newNumeric() the only large option is a long which is not enough for me. I use Java BigInteger class to represent my very large numbers. Any suggestions that might help is very welcomed!

 

Thank you

I am trying to write a procedure that implements Karmarkar's algorithm for solving linear programming problems.

I am getting a parsing error and I am not sure why. Each of the command in the procedure are working the way I want them to but there is something wrong with the loop controls. The code is attached below:

with(LinearAlgebra);

print(??); # input placeholder
Karmarkar:= proc(A,c)

     n:=ColumnDimension(A);

     x:=ZeroVector(n);

     y:=Vector(n,1/(n));

     r:=1/(sqrt(n*(n-1)));

     for i from 1 to nops(NullSpace(A))do

          x:=x+NullSpace(A)[i];

     end do;

     C:=1.0;

     while C>0.0001 do ;

          Diag := DiagonalMatrix(x/Norm(x, 1));

          B := `<,>`(A.Diag, Vector[row](n, 1));

          p := (IdentityMatrix(n)-Transpose(B).MatrixInverse(B.Transpose(B)).B).Transpose(c.Diag);

          p:=evalf(p/(Norm(p,2)));

          y:=y-0.9*r*p;

          x_new:=evalf((Diag . y)/((Vector[row](n,1) . (Diag . y))));

          C:=evalf((c . x_new-c . x)/(c . x));

          if C>0.0001 then

               x_new:=x;

          end if;

      end do;

end proc;

Any ideas on how to fix this?

 

I'm trying to solve a system of two differential equations of the second order in Maple. I set it up as a system of four differential equations of the first order, but after calling for the solution, all I get back is what I entered in without receiving a solution of any sort. What do I need to fix?

Here's what I did:

_________________________________________________

> with(plots);
print(`output redirected...`); # input placeholder

> m := 0.46e-1; d := 0.42e-1; v := 60; alpha0 := 12; g := 9.81; pa := 1.205; cd := .2; n := 100; omega := 2*Pi*(1/60);
                            
> p := 6*m/(Pi*d^3);

> k1 := (3/4)*cd*pa/(d*p); k2 := (3/8)*omega*pa/p;
                                        
> gl1 := vx(t) = diff(x(t), t);                   
> gl2 := vy(t) = diff(y(t), t);
                              
> gl3 := diff(vx(t), t) = -k1*vx(t)*(vx(t)^2+vy(t)^2)^(1/2)-k2*vy(t);
 
> gl4 := diff(vy(t), t) = -g-k1*vy(t)*(vx(t)^2+vy(t)^2)^(1/2)+k2*vy(t);


> init1 := x(0) = 0;
> init2 := y(0) = 0;
> init3 := vx(0) = v*cos((1/15)*Pi);                              
> init4 := vy(0) = v*sin((1/15)*Pi);

> sol; dsolve({gl1, gl2, gl3, gl4, init1, init2, init3, init4}, {vx(t), vy(t), x(t), y(t)}, type = numeric);

> sol(.1);
                            sol(0.1)

> odeplot(sol, t, x(t), t, y(t), t = 0 .. 1);
                   Error, (in plots/odeplot) input is not a valid dsolve/numeric solution


____________________________________________________________________________

After calling for the solution at t=0.1, I don't get anything back. I also tried plotting the solution, but then I receive an error message.

I have downloaded and trying to run the application "Traveling Salesman Problem" by Bruno Guerrieri: 

http://www.maplesoft.com/applications/view.aspx?SID=6873

However, the animations do not work properly. Instead of the animations, I get series of sets of plots. Each such set consists of four plots: one with a green edge, one with a blue edge, one with blue edges, and one with points (nodes).

I guess, it happens because of a new version of maple: the application was created in 2008 for Maple 12, and I use Maple 2015.

Could anybody, please, tell me what exactly should I change in the code so that it will work properly?

Any help will be very much appreciated.

Many thanks in advance!

Hi All, 

 

I'm trying to numerically solve a differential equation which has a numeric function in it. 

For example, consider the function f. 

f:=(r)-> evalf(Int( <some messy function>, <some range>)) ;  <- This can be solved numerically and returns an answer quickly. i.e

f(23) gives 102;

 

Now, I want to numericaly solve something like.

Eq:= diff(p(r),r,r) + diff(p(r),r) - f(p(r));

ICS:=D(p)(0.001)=0, p(0.001) = 3

dsolve({Eq,ICS},numeric).

dsolve will not attempt to solve it due to the numeric integration in f. Is there a way I can just use numeric techniques to solve this kind of problem?

Thanks in advance.  

Is it possible to view maple workbook content in older versions?

This is for the infamous Calc 2 Goblet Maple Project

I have tried everything changed all the numbers and got nowhere or worse results. The only thing that accurately works is the example project:

(0, 1.5) and end at (0.5, 0.2). which equals f1(x)=-2.6x+1.5

and f2:=x->0.2+0.05*sin(2*(x-0.5)) which is really 0.2+0.05sin(2x-1)

The goal is to change the example project so it becomes something of my own creation. 

When I change f2:=x->0.4+0.05*sin(2*x-0.5)) it is at least attached but forms a sharp dip down first then connects at the point when it should be smooth curve. It seems you can do anything to the other curve

f3:=x->a*x^3+b*x^2+c*x+d;
x -> a x^3 + b x^2 + c x + d

connection1:=f3(5.5)=f2(5.5);
166.375 a + 30.25 b + 5.5 c + d = 0.3727989445

arc1:=f3(7)=1;
343 a + 49 b + 7 c + d = 1

arc2:=f3(7.5)=0.9;
421.875 a + 56.25 b + 7.5 c + d = 0.9

arc3:=f3(9)=1.6;
729 a + 81 b + 9 c + d = 1.6

values:=solve({eq1,eq2,eq3,eq4},{a,b,c,d});

F:=x->piecewise(x<0.5,f1(x),x>=0.5 and x<5.5,f2(x),x>=5.5,f3(x));

plot(F(x),x=0..9,y=0..4,scaling=constrained);

So how can this be fixed?

I have an equation 

eq := diff(y(x), x) = ((76.559-179.54*((1/3600)*x+1)+113.15*((1/3600)*x+1)^2-13.661*((1/3600)*x+1)^3+.4621*((1/3600)*x+1)^4)*.88-.15*((76.559-179.54*((1/3600)*x+1)+113.15*((1/3600)*x+1)^2-13.661*((1/3600)*x+1)^3+.4621*((1/3600)*x+1)^4)*.88)*(1-0.45e-2*(y(x)-9.8-273))-(3.8+2.8*3.7+5.76*10^(-8)*(y(x)^2+(273+9.8+(1/46800)*(18.3-9.8)*x)^2)*(y(x)+273+9.8+(1/46800)*(18.3-9.8)*x))*(273+9.8+(1/46800)*(18.3-9.8)*x-y(x)))/(903*(2702*0.2e-2));

Maple gives me a general solution.

then I  tried to get a particular solution using dsolve({eq, y(0) = 283.8});

But Maple dose not return anything.

Thank you for any help.

Is there a difference between these two? 

with(Statistics):

Sample(Normal(0,1),100)

Sample(RandomVariable(Normal(0, 1)), 100)

 

First 1115 1116 1117 1118 1119 1120 1121 Last Page 1117 of 2223