## Fun with the Maple Leaf – Celebrate Canada 150!

by: Maple 2017

This Saturday is Canada’s 150th birthday. As you can imagine, the country has been paying a lot more attention to this year’s anniversary than our usual low key approach, and as a Canadian company, we at Maplesoft decided to join in the fun.

And what better way for Maplesoft to celebrate Canada’s birthday than to create a maple leaf in Maple!

So here is a maple leaf inspired by the Canada 150 logo, which was created by Ariana Cuvin, a student at the University of Waterloo:

Here’s the code to reproduce this plot:

p:=thickness=5,color="#DC2828":
plots:-display(

plot([[-.216,-.216],[0,0],[-.216,.216],[-.81,0],[-.216,-.216]],p),
plot([[-.55,.095],[-.733,.236],[-.49,.245]],p),
plot([[-.376,0],[0,0],[0,.376],[-.705,.705],[-.376,0]],p),
plot([[-.342,.536],[-.355,.859],[-.138,.622]],p),
plot([[-.267,.267],[0,0],[.267,.267],[0,1],[-.267,.267]],p),
plot([[.342,.536],[.355,.859],[.138,.622]],p),
plot([[0.,.376],[0,0],[.376,0],[.705,.705],[0.,.376]],p),
plot([[.55,.095],[.733,.236],[.49,.245]],p),
plot([[.216,.216],[0,0],[.216,-.216],[.81,0],[.216,.216]],p),
plot([[0,-.5],[0,0]],p),

scaling=constrained,view=[-1..1,-.75..1.25],axes=box);

Know other ways to plot a maple leaf in Maple?  If so, please share them below - we’d love to see them!

## Stopping an evaluation if it takes a long time aut...

Is there any method or a command to use or type so Maple start running something or evaluating and if it took more than a specific amount of time, then itself automatically stops itself without needing me to interrupt the evaluation?

For example let's say I wrote a proc, for some inputs it may compute the output fast but in some it may even don't answer after hours. Now I am writing a for and I don't know for which steps it can answer in less than a minute. So I like to add something so that Maple starts the FOR but in steps that it takes more than a minute, it automatically stops evaluation at that step and jump to the next step.

## How to Graph Overlaying Plots With No Errors?...

I am trying to plot some graphs for a differential equations class. I need to plot two equations (soln1a, soln1b1) in one graph, with the two curves overlayed on each other. I am trying to plot them on a graph named "gr1c". The error I get says "Error, (in plots/multiple) empty plot". Clicking on the error results in a webpage saying that "There is no help page available for this error".

When I plot each equation separately, there are no errors. The graphing command that works for soln1a is

gr1a:=plot(rhs(soln1a),dom1,color=blue);

and the graphing command that works for soln1b1 is

gr1b1:=plot(rhs(soln1b_1),dom1,color=purple);

My code is as follows. I would greatly appreciate any help ASAP to remove the error. Thank you!

with(plots):with(DEtools):

K:=9;
deG:=diff(theta(t),t,t) + mu*diff(theta(t),t)+K*sin(theta(t))= 0;
deL:=diff(theta(t),t,t) + mu*diff(theta(t),t)+K*theta(t)= 0;
Iv:=theta(0)=0.75, D(theta)(0)=2.0;
dom1:=t=0..10;
soln1a:=dsolve({eval(deL,mu=0),Iv});

soln1b_1:=dsolve({eval(deL,mu=1),Iv});

gr1c:=multiple(plot[soln1a,soln1b1],dom1,color=[blue,purple]);

## Classical differential geometry...

Unfortunately, the Differential Geometry package is too difficult for non-mathematicians. Is there a package in the Maple for classical differential geometry?

## how can found points on boundary line of surface...

dear all,

I have a problem when I try to find points on boundary of the surface.

the surface ploted from a matrix as follow:

Thanks

## three plots not added at once!...

Dear all,

I want to plot three different plots but not at once! I mean I want to have an animated plot / gif file which shows the plots one by one:

first plot1, then plot2 is added, and at the end plot 3 is added!

Let's say my plots are

plot1:=plot(x,x=0..3)

plot2:=plot(x^2,x=0..3)

plot3:=plot(x^3,x=0..3)

Do you have any suggestions for me?

## Require Maplesim plot for given x,y data...

I have made a program to plot y(t) vs x(t). Can you please modify to plot y vs x data from an excel file.

Given x in A column and y in B column in 5 rows.

Example data: [[1,1],[2,4],[3,9],[4,16],[5,26]]

StLine_VRK.msim

Thanks.

Ramakrishnan V

## Typesetting suppress the t in x dot t...

x dot produces x dot (t)

How do I suppress the t in the output display?  The help page shows an Unsuppress all so I thought a Typsetting:-Suppress(all) would do it, but it throws an error message.

Typesetting:-Suppress(x(t)) would do it but I'd prefer the option all.

## Linear spline set constant endpoints...

I have a set of points. I want to make a linear spline of that points and plot the resulting function:

`function:=CurveFitting[Spline](points_x,points_y,x,degree=1):`

However I need the function to define constant y endpoint values where x is out of points_x range (i.e. first-derivation is zero where x is out of points_x range). Endpoint options does not work for me.

```             constant1   x < xmin
function :=  ..
constant2   otherwise```

How can I define spline function like this?

## Solving and Plotting PDE...

Having difficulties solving pde. Below is the problem and its not plotting. Anyone with useful informations. Please

restart;
with(PDEtools, casesplit, declare);
with(DEtools, gensys);
with(Physics);

PDE := diff(theta(x, t), x, x)+beta*theta(x, t)*(diff(theta(x, t), x, x))+beta*((diff(theta(x, t), x))^2)-M^2*theta(x, t)-S[h]*(theta(x, t)^2)+M^2*G*(1+E*theta(x, t))-P[e]*(diff(theta(x, t), x)) = diff(theta(x, t), t);
/ d  / d             \\
|--- |--- theta(x, t)||
\ dx \ dx            //

/ d  / d             \\
+ beta theta(x, t) |--- |--- theta(x, t)||
\ dx \ dx            //

2
/ d             \     2                               2
+ beta |--- theta(x, t)|  - M  theta(x, t) - S[h] theta(x, t)
\ dx            /

2                              / d             \    d
+ M  G (1 + E theta(x, t)) - P[e] |--- theta(x, t)| = ---
\ dx            /    dt

theta(x, t)
BC := theta(x, 0) = 0, Dt(theta(0, t)) = 0, theta(1, t) = 1;
theta(x, 0) = 0, Dt(theta(0, t)) = 0, theta(1, t) = 1
Codes := [beta = .1, M = .1, S[h] = .1, G = .1, P[e] = .1, E = .1];
S1 := pdsolve({BC, subs(Codes, PDE)});
PDEplot(S1, [[t, theta(x, t)], [x, theta(x, t)]], t = 0 .. 1, x = 0 .. 1, iterations = 2, numchar = [10, 10], stepsize = 0.5e-1, numsteps = [-5, 5]);
PDEplot([[t, theta(x, t)], [x, theta(x, t)]], t = 0 .. 1,

x = 0 .. 1, iterations = 2, numchar = [10, 10],

stepsize = 0.05, numsteps = [-5, 5])

## Error, (in fprintf) number expected for floating p...

hello...i have a problem with this program.

I want to save the result(y,u(y)) in a text or another format file, but I encounter with this error message:

Error, (in fprintf) number expected for floating point formatBVP.mw

restart:

A1:= 5.5:  n:= 0.59:  A2:= 11818.:  h0:= 0.402e-3:
L:= .1:  dpx := -11823.9:  uc:= 0.44e-2:

ODE:= (A3,y)->
(h0^(n+1)*L/sqrt(n)*(A1*exp(sqrt(n)*y/L)-A2*exp(-sqrt(n)*y/L))+dpx*y*h0^(n+1)+A3*(h0)^n)^(1/n)
;

 (1)

ODEINT:= proc(A3)
option remember;
local y;
evalf(Int(ODE(A3,y), y= 0..1, epsilon= 1e-7)) - uc
end proc:

ReINT:= proc(A3x, A3y)
Digits:= 15:
Re(ODEINT(A3x + I*A3y))
end proc:

ImINT:= subs(Re= Im, eval(ReINT)):

Digits:= 7:
a3:= fsolve([ReINT, ImINT]);

 (2)

A3:= Complex(a3[]);

 (3)

Solve as IVP:

Digits:= 15:
sol:= dsolve({diff(u(y),y) = ODE(A3,y), u(0)=0}, numeric, range=0..1,  output=listprocedure):

plots:-odeplot(
sol, [[y, Re(u(y))], [y, Im(u(y))]], y= 0..1,
legend= [real, imag], labels= [y, u(y)]
);

 >

thanks

## displayprecision and typesetting...

According to the help page:
interface(displayprecision=n)
sets the number of decimal places to be displayed to n.
But this is true only if interface(typesetting=extended).
For interface(typesetting=standard),  n represents the number of decimal places after the decimal point.
Is there any reason for this decision?

restart;
x:=123.456789012345:
interface(displayprecision=4):
interface(typesetting=standard): x;

123.4568
interface(typesetting=extended): x;
123.5

## Using subscripts to solve equations?...

I'm trying to calculate forces between particles. I defined all my variables and the equation for force, but when I plug it all in, it gives me 0 when I know for a fact it's not 0. I should be getting something like f12=-0.4, f13=-0.24, and f23=-0.5.

failforce.mw

Basically I defined variables like x1,y1, m1 , etc. and made my force equation fij with all variables having appropriate i and j subscripts.

## 3D animation of rotation?...

Hello!
Used PolyhedralSets for plotting.
At the moment there are a number of questions in the construction of graphs:
How to adjust the rotation of this figure around the z axis?
How to make, what color of a figure received in a cut would be much darker or Darker color?

with(PolyhedralSets);
P1 := PolyhedralSet({-x-20 <= 0, -x-20 <= 20-y, -x-20 <= -(1/2)*y, -x-20 <= -z, -x-20 <= -(x+y)*(1/2), -x-20 <= -(y+z)*(1/2)});
Plot(P1, axe
s = normal, view = [-40 .. 40, -40 .. 40, -40 .. 40], orientation = [30, -30, -60], color = blue, thickness = 2);
Plot(P1, axes = normal, view = [-40 .. 40, -40 .. 40, -40 .. -40], orientation = [0, 0, 0], color = blue, thickness = 2)

## Integration of Planck radiation law...

I'm trying to obtain integral of Planck radiation law in Maple:

with this command:

```f := (2*h*(c)^(2))/((x)^(5))*(1)/(exp((h*c)/(x*k*T))-1);
int(f,x=0..infinity);```

but I get some terrible limit that cannot be solved instead of the correct result:

How to obtain correct integral?

planck.mw

 1 2 3 4 5 6 7 Last Page 1 of 1275
﻿