Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I'm trying to numerically solve the differential equation: y' = -2xy + 1. Naturally, I come across the non-elementary integral of e^(x^2). By hand, I used a 2nd degree MacLaurin polynomial to get y = xe^(-x^2) + x^3/3e^(-x^2)+x^3/6e(-x^2). 

How do I use Maple to numerically solve this, with step sizes of h=0.1 and h=0.05 and plot them?

I have a csvfile that contains text and real numbers. As it contains text there must be some trick to force maple read only floating points and then plot it.

The below works fine if the file doesn't contain text:

 A:= ExcelTools :- Import("C:\\Users\\path\\filename.xls");

p1 := plots:-pointplot(A, style = line, linestyle = dash, color = blue);

plots[display]([p1]);

Thanks,

I'm trying to calculate the trajectory of a 3-particle system. I defined my parameters. Wrote a do loop. Got the number of iterations I expected. But when I look at the tables of position for each particle after I run the loop, the trajectory only changes for the first iteration, then it stays the same. In other words, it shows that the particle moved slightly after the first increment of time, but thereafter it doesn't move.


 

for i to N do x[11] := x[1]+tau*vx[1]+(1/2)*tau^2*F[x1]; y[11] := y[1]+tau*vy[1]+(1/2)*tau^2*F[y1]; x[21] := x[2]+tau*vx[2]+(1/2)*tau^2*F[x2]; y[21] := y[2]+tau*vy[2]+(1/2)*tau^2*F[y2]; x[31] := x[3]+tau*vx[3]+(1/2)*tau^2*F[x3]; y[31] := y[3]+tau*vy[3]+(1/2)*tau^2*F[y3]; R[1] := [op(R[1]), [x[11], y[11]]]; R[2] := [op(R[2]), [x[21], y[21]]]; R[3] := [op(R[3]), [x[31], y[31]]]; V[1] := [op(V[1]), [vx[11], vy[11]]]; V[2] := [op(V[2]), [vx[21], vy[21]]]; V[3] := [op(V[3]), [vx[31], vy[31]]] end do:

101

(5)

 

HI experts,

fibonacci_sequence_with_coefficient.pdf

Is there a Last name associated with a double 'hailstone problem' with variable integer coefficients?

Just curious.

Regards,

Matt

 

I am trying to solve system consisting of two equations and two unknowns. I tried solve but it gives back unevaluated then I tried fsolve which gives an error.
 

restart; x := 2.891022275*`ε`^4*sin(phi)^5*cos(phi)+1.080128320*`ε`^8*sin(phi)^11*cos(phi)+.1742483217*`ε`^10*sin(phi)^9*cos(phi)+3.293959886*`ε`^4*sin(phi)^15*cos(phi)+0.1414814731e-3*`ε`^12*sin(phi)*cos(phi)+0.1186386550e-1*`ε`^10*sin(phi)^3*cos(phi)+4.689119196*`ε`^2*sin(phi)^11*cos(phi)+.2775645236*`ε`^8*sin(phi)^5*cos(phi)+2.242139502*`ε`^6*sin(phi)^7*cos(phi)+6.170463035*`ε`^4*sin(phi)^9*cos(phi)+.2212715683*`ε`^2*sin(phi)*cos(phi)+.2565381358*`ε`^4*sin(phi)*cos(phi)+6.282275004*`ε`^4*sin(phi)^11*cos(phi)+0.9582543506e-5*`ε`^14*sin(phi)*cos(phi)+1.375810863*`ε`^2*sin(phi)^3*cos(phi)+0.4588193106e-1*`ε`^10*sin(phi)^5*cos(phi)+.6194422970*`ε`^8*sin(phi)^7*cos(phi)+0.1249753779e-2*`ε`^12*sin(phi)^3*cos(phi)+3.258184644*`ε`^6*sin(phi)^9*cos(phi)+3.520102051*`ε`^2*sin(phi)^13*cos(phi)+0.9608710101e-4*`ε`^14*sin(phi)^3*cos(phi)+5.222697446*`ε`^4*sin(phi)^13*cos(phi)+0.4740690151e-6*`ε`^16*sin(phi)*cos(phi)+.1124269022*`ε`^10*sin(phi)^7*cos(phi)+0.5349926002e-2*`ε`^12*sin(phi)^5*cos(phi)+.9885168554*`ε`^8*sin(phi)^9*cos(phi)+3.656113028*`ε`^6*sin(phi)^11*cos(phi)+2.252753163*`ε`^2*sin(phi)^15*cos(phi)+0.1562649478e-2*`ε`^10*sin(phi)*cos(phi)+0.8234222560e-1*`ε`^8*sin(phi)^3*cos(phi)+0.1277730241e-1*`ε`^12*sin(phi)^7*cos(phi)+1.148250169*`ε`^6*sin(phi)^5*cos(phi)+0.4933078791e-5*`ε`^16*sin(phi)^3*cos(phi)+4.857729947*`ε`^4*sin(phi)^7*cos(phi)+5.282506255*`ε`^2*sin(phi)^9*cos(phi)+0.1560418629e-7*`ε`^18*sin(phi)*cos(phi)-.6257226193*sin(phi)*cos(phi)+.6645139802*sin(phi)^11*cos(phi)+0.4077214292e-3*`ε`^14*sin(phi)^5*cos(phi)+.1265580305*sin(phi)^17*cos(phi)+.2494189998*sin(phi)^15*cos(phi)+.4337136311*sin(phi)^13*cos(phi)-.1331733921*sin(phi)^3*cos(phi)+.5467360220*sin(phi)^5*cos(phi)+.8861408610*sin(phi)^7*cos(phi)+4.820745909*`ε`^2*sin(phi)^7*cos(phi)+1.134364300*`ε`^2*sin(phi)^17*cos(phi)+0.7437311918e-1*`ε`^6*sin(phi)*cos(phi)+0.1283200926e-1*`ε`^8*sin(phi)*cos(phi)+1.168884099*`ε`^4*sin(phi)^3*cos(phi)+.3981616844*`ε`^6*sin(phi)^3*cos(phi)+3.270035435*`ε`^2*sin(phi)^5*cos(phi)+.8667852062*sin(phi)^9*cos(phi)+0.5208654259e-1*sin(phi)^19*cos(phi)+2.975771526*`ε`^6*sin(phi)^13*cos(phi); y := 2.891022275*`ε`^4*sin(phi)^5*cos(phi)+1.080128320*`ε`^8*sin(phi)^11*cos(phi)+.1742483217*`ε`^10*sin(phi)^9*cos(phi)+3.293959886*`ε`^4*sin(phi)^15*cos(phi)+0.1414814731e-3*`ε`^12*sin(phi)*cos(phi)+0.1186386550e-1*`ε`^10*sin(phi)^3*cos(phi)+4.689119196*`ε`^2*sin(phi)^11*cos(phi)+.2775645236*`ε`^8*sin(phi)^5*cos(phi)+2.242139502*`ε`^6*sin(phi)^7*cos(phi)+6.170463035*`ε`^4*sin(phi)^9*cos(phi)+.2212715683*`ε`^2*sin(phi)*cos(phi)+.2565381358*`ε`^4*sin(phi)*cos(phi)+6.282275004*`ε`^4*sin(phi)^11*cos(phi)+0.9582543506e-5*`ε`^14*sin(phi)*cos(phi)+1.375810863*`ε`^2*sin(phi)^3*cos(phi)+0.4588193106e-1*`ε`^10*sin(phi)^5*cos(phi)+.6194422970*`ε`^8*sin(phi)^7*cos(phi)+0.1249753779e-2*`ε`^12*sin(phi)^3*cos(phi)+3.258184644*`ε`^6*sin(phi)^9*cos(phi)+3.520102051*`ε`^2*sin(phi)^13*cos(phi)+0.9608710101e-4*`ε`^14*sin(phi)^3*cos(phi)+5.222697446*`ε`^4*sin(phi)^13*cos(phi)+0.4740690151e-6*`ε`^16*sin(phi)*cos(phi)+.1124269022*`ε`^10*sin(phi)^7*cos(phi)+0.5349926002e-2*`ε`^12*sin(phi)^5*cos(phi)+.9885168554*`ε`^8*sin(phi)^9*cos(phi)+3.656113028*`ε`^6*sin(phi)^11*cos(phi)+2.252753163*`ε`^2*sin(phi)^15*cos(phi)+0.1562649478e-2*`ε`^10*sin(phi)*cos(phi)+0.8234222560e-1*`ε`^8*sin(phi)^3*cos(phi)+0.1277730241e-1*`ε`^12*sin(phi)^7*cos(phi)+1.148250169*`ε`^6*sin(phi)^5*cos(phi)+0.4933078791e-5*`ε`^16*sin(phi)^3*cos(phi)+4.857729947*`ε`^4*sin(phi)^7*cos(phi)+5.282506255*`ε`^2*sin(phi)^9*cos(phi)+0.1560418629e-7*`ε`^18*sin(phi)*cos(phi)-.6257226193*sin(phi)*cos(phi)+.6645139802*sin(phi)^11*cos(phi)+0.4077214292e-3*`ε`^14*sin(phi)^5*cos(phi)+.1265580305*sin(phi)^17*cos(phi)+.2494189998*sin(phi)^15*cos(phi)+.4337136311*sin(phi)^13*cos(phi)-.1331733921*sin(phi)^3*cos(phi)+.5467360220*sin(phi)^5*cos(phi)+.8861408610*sin(phi)^7*cos(phi)+4.820745909*`ε`^2*sin(phi)^7*cos(phi)+1.134364300*`ε`^2*sin(phi)^17*cos(phi)+0.7437311918e-1*`ε`^6*sin(phi)*cos(phi)+0.1283200926e-1*`ε`^8*sin(phi)*cos(phi)+1.168884099*`ε`^4*sin(phi)^3*cos(phi)+.3981616844*`ε`^6*sin(phi)^3*cos(phi)+3.270035435*`ε`^2*sin(phi)^5*cos(phi)+.8667852062*sin(phi)^9*cos(phi)+0.5208654259e-1*sin(phi)^19*cos(phi)+2.975771526*`ε`^6*sin(phi)^13*cos(phi); evalf(solve({x = 0, y = 0}, {phi, `ε`})); fsolve({x = 0, y = 0}, {phi, `ε`})

.9885168554*`ε`^8*sin(phi)^9*cos(phi)+0.1249753779e-2*`ε`^12*sin(phi)^3*cos(phi)+3.258184644*`ε`^6*sin(phi)^9*cos(phi)+.1124269022*`ε`^10*sin(phi)^7*cos(phi)+0.4588193106e-1*`ε`^10*sin(phi)^5*cos(phi)+.2565381358*`ε`^4*sin(phi)*cos(phi)+6.282275004*`ε`^4*sin(phi)^11*cos(phi)+0.4933078791e-5*`ε`^16*sin(phi)^3*cos(phi)+5.282506255*`ε`^2*sin(phi)^9*cos(phi)+2.242139502*`ε`^6*sin(phi)^7*cos(phi)+6.170463035*`ε`^4*sin(phi)^9*cos(phi)+0.8234222560e-1*`ε`^8*sin(phi)^3*cos(phi)+0.9608710101e-4*`ε`^14*sin(phi)^3*cos(phi)+3.656113028*`ε`^6*sin(phi)^11*cos(phi)+5.222697446*`ε`^4*sin(phi)^13*cos(phi)+0.1562649478e-2*`ε`^10*sin(phi)*cos(phi)+.6194422970*`ε`^8*sin(phi)^7*cos(phi)+3.520102051*`ε`^2*sin(phi)^13*cos(phi)+0.1186386550e-1*`ε`^10*sin(phi)^3*cos(phi)+4.689119196*`ε`^2*sin(phi)^11*cos(phi)+1.375810863*`ε`^2*sin(phi)^3*cos(phi)+0.4740690151e-6*`ε`^16*sin(phi)*cos(phi)+0.4077214292e-3*`ε`^14*sin(phi)^5*cos(phi)+0.9582543506e-5*`ε`^14*sin(phi)*cos(phi)+0.5349926002e-2*`ε`^12*sin(phi)^5*cos(phi)+.1742483217*`ε`^10*sin(phi)^9*cos(phi)+1.148250169*`ε`^6*sin(phi)^5*cos(phi)+0.1277730241e-1*`ε`^12*sin(phi)^7*cos(phi)+0.7437311918e-1*`ε`^6*sin(phi)*cos(phi)+1.080128320*`ε`^8*sin(phi)^11*cos(phi)+2.975771526*`ε`^6*sin(phi)^13*cos(phi)+1.134364300*`ε`^2*sin(phi)^17*cos(phi)+3.293959886*`ε`^4*sin(phi)^15*cos(phi)+1.168884099*`ε`^4*sin(phi)^3*cos(phi)+3.270035435*`ε`^2*sin(phi)^5*cos(phi)+0.1283200926e-1*`ε`^8*sin(phi)*cos(phi)+4.820745909*`ε`^2*sin(phi)^7*cos(phi)+.3981616844*`ε`^6*sin(phi)^3*cos(phi)+2.891022275*`ε`^4*sin(phi)^5*cos(phi)+0.1414814731e-3*`ε`^12*sin(phi)*cos(phi)+.2212715683*`ε`^2*sin(phi)*cos(phi)+2.252753163*`ε`^2*sin(phi)^15*cos(phi)+4.857729947*`ε`^4*sin(phi)^7*cos(phi)+.2775645236*`ε`^8*sin(phi)^5*cos(phi)+0.1560418629e-7*`ε`^18*sin(phi)*cos(phi)-.6257226193*sin(phi)*cos(phi)+.8667852062*sin(phi)^9*cos(phi)+0.5208654259e-1*sin(phi)^19*cos(phi)+.1265580305*sin(phi)^17*cos(phi)+.2494189998*sin(phi)^15*cos(phi)+.4337136311*sin(phi)^13*cos(phi)-.1331733921*sin(phi)^3*cos(phi)+.5467360220*sin(phi)^5*cos(phi)+.8861408610*sin(phi)^7*cos(phi)+.6645139802*sin(phi)^11*cos(phi)

 

.9885168554*`ε`^8*sin(phi)^9*cos(phi)+0.1249753779e-2*`ε`^12*sin(phi)^3*cos(phi)+3.258184644*`ε`^6*sin(phi)^9*cos(phi)+.1124269022*`ε`^10*sin(phi)^7*cos(phi)+0.4588193106e-1*`ε`^10*sin(phi)^5*cos(phi)+.2565381358*`ε`^4*sin(phi)*cos(phi)+6.282275004*`ε`^4*sin(phi)^11*cos(phi)+0.4933078791e-5*`ε`^16*sin(phi)^3*cos(phi)+5.282506255*`ε`^2*sin(phi)^9*cos(phi)+2.242139502*`ε`^6*sin(phi)^7*cos(phi)+6.170463035*`ε`^4*sin(phi)^9*cos(phi)+0.8234222560e-1*`ε`^8*sin(phi)^3*cos(phi)+0.9608710101e-4*`ε`^14*sin(phi)^3*cos(phi)+3.656113028*`ε`^6*sin(phi)^11*cos(phi)+5.222697446*`ε`^4*sin(phi)^13*cos(phi)+0.1562649478e-2*`ε`^10*sin(phi)*cos(phi)+.6194422970*`ε`^8*sin(phi)^7*cos(phi)+3.520102051*`ε`^2*sin(phi)^13*cos(phi)+0.1186386550e-1*`ε`^10*sin(phi)^3*cos(phi)+4.689119196*`ε`^2*sin(phi)^11*cos(phi)+1.375810863*`ε`^2*sin(phi)^3*cos(phi)+0.4740690151e-6*`ε`^16*sin(phi)*cos(phi)+0.4077214292e-3*`ε`^14*sin(phi)^5*cos(phi)+0.9582543506e-5*`ε`^14*sin(phi)*cos(phi)+0.5349926002e-2*`ε`^12*sin(phi)^5*cos(phi)+.1742483217*`ε`^10*sin(phi)^9*cos(phi)+1.148250169*`ε`^6*sin(phi)^5*cos(phi)+0.1277730241e-1*`ε`^12*sin(phi)^7*cos(phi)+0.7437311918e-1*`ε`^6*sin(phi)*cos(phi)+1.080128320*`ε`^8*sin(phi)^11*cos(phi)+2.975771526*`ε`^6*sin(phi)^13*cos(phi)+1.134364300*`ε`^2*sin(phi)^17*cos(phi)+3.293959886*`ε`^4*sin(phi)^15*cos(phi)+1.168884099*`ε`^4*sin(phi)^3*cos(phi)+3.270035435*`ε`^2*sin(phi)^5*cos(phi)+0.1283200926e-1*`ε`^8*sin(phi)*cos(phi)+4.820745909*`ε`^2*sin(phi)^7*cos(phi)+.3981616844*`ε`^6*sin(phi)^3*cos(phi)+2.891022275*`ε`^4*sin(phi)^5*cos(phi)+0.1414814731e-3*`ε`^12*sin(phi)*cos(phi)+.2212715683*`ε`^2*sin(phi)*cos(phi)+2.252753163*`ε`^2*sin(phi)^15*cos(phi)+4.857729947*`ε`^4*sin(phi)^7*cos(phi)+.2775645236*`ε`^8*sin(phi)^5*cos(phi)+0.1560418629e-7*`ε`^18*sin(phi)*cos(phi)-.6257226193*sin(phi)*cos(phi)+.8667852062*sin(phi)^9*cos(phi)+0.5208654259e-1*sin(phi)^19*cos(phi)+.1265580305*sin(phi)^17*cos(phi)+.2494189998*sin(phi)^15*cos(phi)+.4337136311*sin(phi)^13*cos(phi)-.1331733921*sin(phi)^3*cos(phi)+.5467360220*sin(phi)^5*cos(phi)+.8861408610*sin(phi)^7*cos(phi)+.6645139802*sin(phi)^11*cos(phi)

 

{phi = 0., `ε` = `ε`}, {phi = 1.570796327, `ε` = `ε`}, {phi = phi, `ε` = RootOf(1560418629*_Z^18+(47406901510+493307879100*sin(phi)^2)*_Z^16+(40772142920000*sin(phi)^4+9608710101000*sin(phi)^2+958254350600)*_Z^14+(14148147310000+124975377900000*sin(phi)^2+534992600200000*sin(phi)^4+1277730241000000*sin(phi)^6)*_Z^12+(11242690220000000*sin(phi)^6+1186386550000000*sin(phi)^2+17424832170000000*sin(phi)^8+156264947800000+4588193106000000*sin(phi)^4)*_Z^10+(8234222560000000*sin(phi)^2+61944229700000000*sin(phi)^6+98851685540000000*sin(phi)^8+108012832000000000*sin(phi)^10+27756452360000000*sin(phi)^4+1283200926000000)*_Z^8+(7437311918000000+114825016900000000*sin(phi)^4+297577152600000000*sin(phi)^12+325818464400000000*sin(phi)^8+365611302800000000*sin(phi)^10+224213950200000000*sin(phi)^6+39816168440000000*sin(phi)^2)*_Z^6+(485772994700000000*sin(phi)^6+628227500400000000*sin(phi)^10+522269744600000000*sin(phi)^12+329395988600000000*sin(phi)^14+25653813580000000+617046303500000000*sin(phi)^8+116888409900000000*sin(phi)^2+289102227500000000*sin(phi)^4)*_Z^4+(22127156830000000+137581086300000000*sin(phi)^2+468911919600000000*sin(phi)^10+352010205100000000*sin(phi)^12+225275316300000000*sin(phi)^14+528250625500000000*sin(phi)^8+327003543500000000*sin(phi)^4+113436430000000000*sin(phi)^16+482074590900000000*sin(phi)^6)*_Z^2-62572261930000000-13317339210000000*sin(phi)^2+12655803050000000*sin(phi)^16+54673602200000000*sin(phi)^4+86678520620000000*sin(phi)^8+43371363110000000*sin(phi)^12+66451398020000000*sin(phi)^10+88614086100000000*sin(phi)^6+24941899980000000*sin(phi)^14+5208654259000000*sin(phi)^18)}

 

Error, (in fsolve) number of equations, 1, does not match number of variables, 2

 

``


 

Download equations_solve.mw

how can i solve this inequality in maple ? i want to solve y in terms of x and then plot y,x
could anyone help? tnx in advance

 


 

restart:

with(SolveTools[Inequality]):

eq:=1/(x*y^(2/3))*8.620689655172415*10^(-16)*(-3.11*10^23*x^2*y^(7/6)-3.92*10^19*y^(25/6)+2.14545039999999*10^29*(0.0108*exp(-45.07/y)+exp(-19.98/y^(1/3)-0.00935317203476387*y^2)))/(x+0.015*y^(1.2));

0.8620689655e-15*(-0.3110000000e24*x^2*y^(7/6)-0.3920000000e20*y^(25/6)+0.2317086432e28*exp(-45.07/y)+0.2145450400e30*exp(-19.98/y^(1/3)-0.935317203476387e-2*y^2))/(x*y^(2/3)*(x+0.15e-1*y^1.2))

(1)

solve({eq>0},y);

Warning, solutions may have been lost

 

 


 

Download solveee.mw

I need to install FGb package into Maple, the instruction is here:http://www-polsys.lip6.fr/~jcf/FGb/FGb/darwin_i386/index.html

But after I tried so many times, I am still unable to install the package(the instruction is a little bit unclear).  Basically, I downloaded the file FGb-1.61.macosx.tar.gz  in my home directory and unzip it. I created .mapleinit and put these commands inside:

libname:= “Macintosh HD/Users/jinhuilitar xvfz/tmp/FGb-1.61.macosx.tar.gz”/FGblib, libname:

mv <12627>/*.so <Macintosh HD/Users/jinhuili/tar xvfz/tmp/FGb-1.61.macosx.tar.gz>

 mv <12627>/FGblib <Macintosh HD/Users/jinhuili/tar xvfz/tmp/FGb-1.61.macosx.tar.gz>

 

I put .mapleinit in the home directory as well. But after I did all of these followed the instructions, I opened Maple and type with(FGb), it says FGb does not exist. I am so desperate, I have tried two days to solve this simple problem, please help.

I am trying to evaluate the following equation analytically but it gives back unevaluated then I tried fsolve which giving me the answer but I need phi greater than  zero. How can I avoid negative values. Also Is there any ways to solve it analytically. 

Please see the attachment

 

Download ANALYTIC.mw

 

Dear all,

 

I'd like to make a logplot with the option axes = boxed . 

let's say:

plot(x^3, x = 0 .. 2, axes = boxed)

But I need the tickmarks and numbers on both y-axes.

Could you tell me how to do this?

See the below. The two answers should be identical, but they are not.

Input:


Output:


 

I have an excel macro file (enable macro or save as macro and run) in which the colour of cells keep changing by a macro named macro2.

Can we achieve it in maple or maple sim?

Any one please suggest a way for me to try out.

COLOR1.xlsx

Thanks.

Ramakrishnan V

Hi, 

Can we tell maple to give output in a form which contain any specific term or expression. For example- Can I tell maple to give output which contain (x^2+2*x+3) expression in the output. I used various combinations in collect command but it doesn't work. It is shown in enclosed maple worksheet.

I have some questions about output produced by maple. I have attached a maple worksheet in which I asked the questions in comments. Please help mein in this problem because it become very tedious to type each expression by hand in desired form. If maple produce it by some means it would be great help.

desired_form_in_output.mw

Thanks and Regards,

Nilesh

 

 

When we first started trying to use Maple to create a maple leaf like the one in the Canada 150 logo, we couldn’t find any references online to the exact geometry, so we went back to basics. With our trusty ruler and protractor, we mapped out the geometry of the maple leaf logo by hand.

Our first observation was that the maple leaf could be viewed as being comprised of 9 kites. You can read more about the meaning of these shapes on the Canada 150 site (where they refer to the shapes as diamonds).

We also observed that the individual kites had slightly different scales from one another. The largest kites were numbers 3, 5 and 7; we represented their length as 1 unit of length. Also, each of the kites seemed centred at the origin, but was rotated about the y-axis at a certain angle.

As such, we found the kites to have the following scales and rotations from the vertical axis:

Kites:

1, 9: 0.81 at +/- Pi/2

2, 8: 0.77 at +/- 2*Pi/5

3, 5, 7: 1 at +/-Pi/4, 0

4, 6: 0.93 at +/- Pi/8

This can be visualized as follows:

To draw this in Maple we put together a simple procedure to draw each of the kites:

# Make a kite shape centred at the origin.
opts := thickness=4, color="#DC2828":
MakeKite := proc({scale := 1, rotation := 0})
    local t, p, pts, x;

    t := 0.267*scale;
    pts := [[0, 0], [t, t], [0, scale], [-t, t], [0, 0]]:
    p := plot(pts, opts);
    if rotation<>0.0 then
        p := plottools:-rotate(p, rotation);
    end if;
    return p;
end proc:

 

The main idea of this procedure is that we draw a kite using a standard list of points, which are scaled and rotated. Then to generate the sequence of plots:

shapes := MakeKite(rotation=-Pi/4),
          MakeKite(scale=0.77, rotation=-2*Pi/5),

          MakeKite(scale=0.81, rotation=-Pi/2),
          MakeKite(scale=0.93, rotation=-Pi/8),
          MakeKite(),
          MakeKite(scale=0.93, rotation=Pi/8),
          MakeKite(scale=0.81, rotation=Pi/2),
          MakeKite(scale=0.77, rotation=2*Pi/5),
          MakeKite(rotation=Pi/4),
          plot([[0,-0.5], [0,0]], opts): #Add in a section for the maple leaf stem
plots:-display(shapes, scaling=constrained, view=[-1..1, -0.75..1.25], axes=box, size=[800,800]);

This looked pretty similar to the original logo, however the kites 2, 4, 6, and 8 all needed to be moved behind the other kites. This proved somewhat tricky, so we just simply turned on the point probe in Maple and drew in the connected lines to form these points.

shapes := MakeKite(rotation=-Pi/4),
          plot([[-.55,.095],[-.733,.236],[-.49,.245]],opts),

          MakeKite(scale=0.81, rotation=-Pi/2),
          plot([[-.342,.536],[-.355,.859],[-.138,.622]],opts),
          MakeKite(),
          plot([[.342,.536],[.355,.859],[.138,.622]],opts),
          MakeKite(scale=0.81, rotation=Pi/2),
          plot([[.55,.095],[.733,.236],[.49,.245]],opts),
          MakeKite(rotation=Pi/4),
          plot([[0,-0.5], [0,0]], opts):
plots:-display(shapes, scaling=constrained, view=[-1..1, -0.75..1.25], axes=box, size=[800,800]);

Happy Canada Day!

Hi,

I have two objective function which I want to prove concave with respect to four independent variables jointly (simultaneously).

`TP1 is the first objective function which is defined  in sol1 equation. TP2 is the second objective function which is defined  in sol3 equation. I want to maximize both function. There are four decision variables (independent variables) in both the objective function expression- T,E,W,p. Ten  parameters used in both the equations are- alpha, beta, c, h, m, o, s, u, a, b.

1) My first question is - How can I prove both the function as a concave function with respect to four decision variables jointly. Can I specify some range of parameters in which both these function would behave like a concave function. The feasible range of these parameters are-

`[alpha>0, 0<= beta<1, c>0, h>0, 0<= m<=1, o>0, s>0, u>0, a>0] [ b>0 for objective function TP1 and b>1 for objective function TP2].

Some other restriction on parameters and variables are-  p>c  ,  T<=m , T>=0, E>=0, W>=0, W>=E.

2) My second question is if I simplify my first question and specify some specific values of parameters as I done for both objective function, then I got two new objective function in sol2 and sol4 equation. Now can I prove these two objective function (sol2 & sol4) as concave with respect to four decision variables T,E,W,p jointly. I want to prove concavity for these two objective function because if it is proved concave then The first order optimality solution would give me the global optimal solution. 

Maple worksheet is enclosed.

concavity_proof_question.mw

Thanks and Regards,

Nilesh

I have a plain text file, with hundreds of lines. I read using the command

ImportMatrix(file_to_read, source=csv):

The files has mixed fields which are integers and strings. The problem happens when a string happeneds to be "0". Maple interprets this when reading as the integer zero and not as the string zero! So that when I print this field later on using printf("%s",field) I get an error. (since I know this field is string, the format for output is fixed in the code). 

I made a very small example to illustrate. One line with 4 fields. The 4ht field is string.

This specific field is always a string with alphanumeric content in the file. It has " " around it. But sometimes the content of the string happens to be the string "0".  Maple gets confused and reads "0" as integer 0.

Is there a way to tell Maple not to read this string as an integer using ImportMatrix?

Here is MWE to show the problem


restart;
currentdirName :="C:\\bug";
currentdir(currentdirName);
file_to_read := cat(currentdirName,"\\maple_input.txt");
data:=ImportMatrix(file_to_read, source=csv):

print(data);
whattype(data[1,1]);
whattype(data[1,4]);

printf("%d,%d,%d,%s",data[1,1],data[1,2],data[1,3],data[1,4]):

 

The input file maple_input.txt has this one line in it:

1,2,3,"0"

As you can see, the 4ht field is a string.  But Maple reads it as integer:

 

This is using Maple 2017.1 on windows. Also Attached the text file.

1,2,3,"0"

Download maple_input.txt

 

First 952 953 954 955 956 957 958 Last Page 954 of 2229