Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

How do I introduce the first derivative of M when i<> k and aij when i <> j and aii in Maple?

 

 

Am trying to teach myself "circle inversion" to solve circle geometry problems.  Towards this end I wrote a Maple 7 program to draw a Pappus chain of circles.  Pappus lived around 200AD, and I read that he considered this problem ancient!  

   The output diagram may not come out on this forum, but it comes out as a collection of tangential circles, and I have no problems with that.  In drawing the circles I was thinking of using the infinity symbol.  The following line uses the infinity, but with a minus sign.  Maple is "happy" with this and outputs square braces, suggesting an empty list?  I changed the program by omitting the -ve sign - and Maple came up with an error message.  I would have expected the output to include the value zero  ie [0]  I think it is just that the infinity symbol is not allowed in the seq command. 

[seq( i, i=0..-infinity )];  #???  why the -?,

 

In the next part I define X, Y and rad as the coordinates and radii of a sequence of circles: subscript i, ranging from start to nterm, (for the number of terms).  These are set at 1 and 286.   The program works OK with these values, but if the variable start is changed to zero, 0, it doesn't work.  I thought I might have a division by zero, but can't find one.  I also drew a circle with a radius of zero - no problem!  (...except it's difficult to see:-))   

   My main puzzle is why does it come up with the error message "invalid subscript selector" when the variable start is set to 0?

With i=start=0 I am asking it to draw a circle of radius zero at some specified coords - but it doesn't like it!  

  Any comments would be appreciated.  Merry Christmas.

David

 

 

restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Pappus Chain of circles

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

with(plots):

with(plottools):

#Maple 7

#r is ratio of AC/AB = diam of large circle, to a smaller internally tangential one

r:=1.35:

#Why will start=0 not work?

start:=1:

#nterm=286 is smallest value where axes have "true" origin of (0.0)

#nterm<= 285 puts "x-axis" below y=-0.6

nterm:=286:

X := [seq( 0.5*r*(1+r)/(((i*(1-r))^2)+r), i=start..nterm )]:

 

Y := [seq( i*r*(1-r)/(((i*(1-r))^2)+r), i=start..nterm )]:

rad:=[seq(0.5*r*(1-r)/((i*(1-r))^2+r), i=start..nterm)]:

[seq( i, i=0..-infinity )];  #???  why the -?

#Gives [] output with -ve sign:  empty list?  Why is 0 not included?

# Not allowed to use with seq

#ccc:=[seq(circle([X[i],Y[i]],rad[i]), i=1..5)]:  #nops(X))]:

ccc:=[seq(circle([X[i],Y[i]],rad[i]), i=start..nterm)]:

#c := circle([1,1], 0, color=red):

#plots[display](c, scaling=constrained);

plots[display](ccc, scaling=constrained);

 

OUTPUT

 

Hello

Long time asker of minimization problems here.

Following on from my question on 2D packing.

I found this "solved" problem for packing 3D items efficiently. See Illustration 6.13

https://www.researchgate.net/file.PostFileLoader.html?id=59938b635b49527571134c33&assetKey=AS%3A527790252490752%401502846410852

Some discrepancies with constraint set-up (first one), number of variables and the optimized solution.

3DbinPack2.mw

 

Hello

When I export a worksheet table as HTML,MATH EXPRESSIONS: GIF the resulting .html file is 100% readable.

screenshot:

But when i send the html file to myself over email, I get gibberish

The (acer) code for the top is... .....Equation(Standings[id]:-mu &+- Standings[id]:-sigma....

and below opponents rating: ....Cell(Equation(thetable[id][':-losses'][r][1] &+- thetable[id][':-losses'][r][2],......

Anyone shed?

Does any body have example of maple code for solving optimal control problem in deterministic model using Pontryagin's maximum (or minimum) principle?

Say I want to use multiples commands on an expression

simplify(expand(eval(expr,x=y+1)))

 

Now similar I could use

(simplify@expand)(expr)

but how do I do it with sth like eval which needs extra arguments

(simplify@expand@eval(x->y, x=y+1))(f)

??

t := 5;
                               5
u := exp((1/2)*x-2*t*(1/3));
                            /1     10\
                         exp|- x - --|
                            \2     3 /
plot(u(x), x = -4 .. 4);


this is the exact solution graph

while below is the approximate solution graph

h := -1;
                               -1
t := 5;
                               5
u := exp((1/2)*x)*(1+t*(27*h^4+108*h^3+240*h^2+256*h)/2^7+t^2*(27*h^4+24*h^3+168*h^2)/2^7+(1/3)*t^3*(9*h^4+16*h^3)/2^6+(1/4)*t^4*h^4/2^4);
                         6877    /1  \
                         ---- exp|- x|
                         192     \2  /
plot(u(x), x = -4 .. 4);

 

Please help me

Please, anyone with usefull informations to hint me. Looking forward to your favorable response. 

Thanking you in advance

Hello,

how could I force Maple to solve this pde

pdsolve(y*(diff(f(x, y, z, w), x))-x*(diff(f(x, y, z, w), y))+w*(diff(f(x, y, z, w), z))-z*(diff(f(x, y, z, w), w)) = 0)

When I hit enter, it happens nothing.

Below is MAPLE code to simplify a series.  MAPLE expresses the result in terms of functions which many people are not familiar with.  Is there a way to express the answer in terms of more conventional functions expecially if N is a positive integer?


 

Cn := ((-I)*(1/2))*(2*(I*Pi*n*tau-(2*I)*Pi*n)*cos(Pi*n*tau/T)-T*(2*I)*sin(Pi*n*tau/T)+(4*I)*Pi*n)/(Pi^2*n^2); S4 := a[0]+sum(Cn*sin(2*Pi*n*x/T), n = 1 .. k); a[0] := 0; T := 4; tau := 2; Cn; S5 := unapply(S4, k, x); T := simplify(S5(N, x))

convert(T, StandardFunctions);

(-polylog(2, exp(-((1/2)*I)*Pi*(x-1)))*N^2-exp(-((1/2)*I)*Pi*N*(x+1))*LerchPhi(exp(-((1/2)*I)*(x+1)*Pi), 2, N)*N^2+polylog(2, exp(((1/2)*I)*(x+1)*Pi))*N^2+exp(-((1/2)*I)*Pi*N*(x-1))*LerchPhi(exp(-((1/2)*I)*Pi*(x-1)), 2, N)*N^2+polylog(2, exp(-((1/2)*I)*(x+1)*Pi))*N^2-exp(((1/2)*I)*Pi*N*(x+1))*LerchPhi(exp(((1/2)*I)*(x+1)*Pi), 2, N)*N^2-polylog(2, exp(((1/2)*I)*Pi*(x-1)))*N^2+exp(((1/2)*I)*Pi*N*(x-1))*LerchPhi(exp(((1/2)*I)*Pi*(x-1)), 2, N)*N^2+exp(((1/2)*I)*Pi*N*(x+1))-exp(((1/2)*I)*Pi*N*(x-1))+exp(-((1/2)*I)*Pi*N*(x+1))-exp(-((1/2)*I)*Pi*N*(x-1))-I*exp(-((1/2)*I)*x*Pi*N)*LerchPhi(exp(-((1/2)*I)*x*Pi), 1, N)*N^2*Pi-I*ln(1-exp(-((1/2)*I)*x*Pi))*N^2*Pi+I*exp(((1/2)*I)*x*Pi*N)*LerchPhi(exp(((1/2)*I)*x*Pi), 1, N)*N^2*Pi+I*ln(1-exp(((1/2)*I)*x*Pi))*N^2*Pi-I*exp(((1/2)*I)*x*Pi*N)*N*Pi+I*exp(-((1/2)*I)*x*Pi*N)*N*Pi)/(N^2*Pi^2)

(1)

``


 

Download simplify.mw

Request help in solving the equation:

Eq_H_1 := C[11*m]*(int((t-(j-1)*T)*alpha*(-alpha*(K*T*beta+T*beta*j-K*T-T*beta-T*j-beta*t+T+t))^(-beta/(beta-1))*exp(-R[m]*t), t = (j-1)*T .. (K+j-1)*T))

 

Thanks

Hi everyone,
I have to make a project that need to use openmaple in java. The problems is when i get the output data of the textCallBack method, i try to convert the output to utf-8 format using the UTF8Encoder provided in java Maple JAR file in order to display Vietnamese language but it doesn't work (the output type is String). Are there any solutions? Thank you.

Here are two inocent Vectors.

V1 := Vector[row]([`+`, 1, 2]);

_rtable[18446744074366295326]

(1)

V2 := Vector[row]([1, `+`, 2]);

_rtable[18446744074366288110]

(2)

lprint(V1);

Vector[row](3, {1 = `+`, 2 = 1, 3 = 2}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [])

 

 

The questions:

 

1.  Try to guess the Maple's answer for:

 

V1, V2;

 

2. Try to explain.

 


Download v1v2.mw

I'm having sone trouble with my matricies after running restart. When creating the matrice, everything is fine and they are defined as normal. But, if I run restart and try to erdefine them, they are defined as some form of 

The only way I've been able to fix this besides restarting Maple is to either add or remove the colon after the matrix, depending on wether there was one. If ther was, when I remove it the matrix is defined normally and vice versa. I'm relatively new to Maple coming from Matlab and would like to start using it more, but this matrix thing is very frustrating. I've attached a copy of the maple file. Thanks

First definition, everything is normal:

After restart, everything goes bad:

First 131 132 133 134 135 136 137 Last Page 133 of 2218