## How to write the procedure RungeKutta(f, a, b, alp...

For my differential equations class we have to input the following problem into Maple, I've never used maple before and I was wondering if someone who is experienced with maple could help me out with the code to put into Maple. Thanks I appreciate it!

Using the Maple program, Write the procedure RungeKutta(f, a, b, aplpha, n) which use the improved Euler's method to approximate the solution of the initial-value problem y'=f(t,y), a$\leq$t$\leq$b, y(a)= alpha at (n+1) equally spaced numbers in the interval [a,b]

The input parameters are as follow:

f is the name of the function f(t,y);

a and b are the end points of the interval of integration;

alpha is the initial condition.

The output: array w is the approximation of y at the (n+1) values of t.

## Bifurcation Procedure for the Rossler Attractor...

Hi,

I'm currently studying the Rossler Attractor, which is the following system:

.

I have found the points of equilibrium of the system.

But now I need to draw bifurcation diagrams: one for varying a, one for varying b, and one for varying c.

## How find a point over this curve?...

Hi!

Consider, fixed an integer m>1, the mapping given by the following procedure:

G := proc (t) local k, C; C := NULL; C := t; for k from 2 to d do C := C, 1/2-(1/2)*cos(Pi*m^(k-1)*t) end do; return [C] end proc

Then, it can be proved that given x in the cube [0,1]^{d} there is t in [0,1] such that the norm of x-G(t) is less, or equal, than sqrt(d-1)/m. Indeed, dividing the cube [0,1]^{d} into m^{d-1} subcubes of side-length 1/m x ... x 1/m x 1, the point x belongs to some of these subcubes, say J. As, by the properties of the cosines function, the curve G(t) lies in J whenever t in certain subinterval of [0,1], the result follows.

In other words, computing all the solutions of the equation

1/2*(1-cos(Pi*m^(d-1)*t)) = x[d], (j-1)/m <= t and t <= j/m

for some of these solutions the desired t is obtained, where j is such that x1 in [(j-1)/m,j/m] (x1 is the first coordinate of the point x). However, for large values of m and d, the above equation have many solutions, I have tried find all of them and the process is extremely slow....Other way to find such a t can be the following: find a t satisfying the following system of inequalities

EQ := abs(t-x[1]) <= 1/m; for k from 2 to d do EQ := EQ, abs(1/2*(1-cos(Pi*m^(k-1)*t))-x[k]) <= 1/m end do

and then, a solution of this system is a such t. I do not know how to find, efficiently, a t such that of x-G(t) is less, or equal, than sqrt(d-1)/m   :(

Some idea?

## can Maple solve the Burger's PDE for viscous fluid...

I am having trouble getting Maple 2017.3 with latest Physics update to give solution to Burger's PDE for viscous fluid flow with the following initial condition. May be I am not doing something right. I tried different HINTS, but no luck.

Maple can solve the PDE without the initial conditions.

May be a Maple expert can find work around or show what I might be doing wrong.

restart;
pde := diff(u(x, t), t) + u(x, t)*diff(u(x, t), x) = mu*diff(u(x,t),x\$2);
ic  := u(x,0) = PIECEWISE([0,x>=0],[1,x<0]);
sol := pdsolve({pde,ic}, u(x, t)) assuming mu>0;


Maple returns () as solution.

This PDE can be solved analytically. Here is Mathematica' solution

ClearAll[u,x,y,mu]
pde = D[u[x,t],{t}]+u[x,t]*D[u[x,t],{x}]==mu*D[u[x,t],{x,2}];
ic  = u[x,0]==Piecewise[{{1,x<0},{0,x>=1}}];
sol = DSolve[{pde,ic},u[x,t],{x,t},Assumptions->mu>0]

## attempting to load large maple worksheet - freezes...

Came across this issue again.  While working within a worksheet, everything seems fine, using commands like imagetools outputing bmp files etc.  I had to, in the the Options->Precision, uncheck limit expression length to 1000000 during my session.  I saved it multiple times, however and unfortunately did not save as seperate versions, so I was left with one file.

The file size ended up being 64Mb.  The problem is trying to load it into Maple, everytime I try to load the worksheet my computer seems to freeze (laptop, 4Gb RAM, windows 7 64 bit, Maple 2017) I check task manager and my javaw.exe file is consuming 3.7Gb of memory!  So that's why it's locking up.

I've tried multiple times to open the file and utilmately end up pressing and holding the power button to restart my system.

## How to 3D print a vector field showing field stren...

To restrict the domain of a vector field, I have multiplied a coordinate with a non-real complex number (namely a sqrt(of negative expression)). This does work, as shown in this Maple 2017 worksheet program (below). My question is whether this is the best technique of accomplishing this result, or else how to do it better? Would be interested in suggestions for improvements. Here is my program so far:

restart;
#
with(plots):
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print( Vector Field inside Torus);
print( ------- ------- ------- ------- ------- ------- -------);
print( Assignment:  );
print( In a circular pipe of radius (my2r), water is flowing in the direction );
print( of the pipe, with speed (my2r)^2-(mya)^2, where (mya) is the distance  );
print( to the axis of the pipe.  );
print( Depict the vector field describing the flow if the pipe goes around in );
print( the shape of a torus with major radius (my1r).  );
print(   );
print(   );
print(   );
print( ------- ------- ------- ------- ------- ------- -------);
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 1) major radius of torus:);
#
my1r  := 5;
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 2) minor radius of torus (pipe radius):);
#
my2r := 4;
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 3) definition of torus (polar coordinates):);
#
c00 := [(my1r+my2r*cos(s))*cos(t),(my1r+my2r*cos(s))*sin(t),my2r*sin(s)];
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 4) 3D plot of solid torus (polar coordinates):);
#
plot3d({c00},scaling=constrained,color=red);
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 5) 3D plot of wireframe torus (polar coordinates):);
#
P1 := plot3d({c00},scaling=constrained,style=wireframe);
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 6) implicit definition of torus (cartesian coordinates):);
#
c01 := (sqrt(x^2+y^2)-my1r)^2+z^2-my2r^2;
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 7) implicit 3D plot of solid torus (cartesian coordinates):);
#
gx := my1r+my2r; # min and max of each coordinate
#
implicitplot3d(c01,x=-gx..gx,y=-gx..gx,z=-gx..gx,numpoints=9000);
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 8) vector field definition (cartesian coordinates):);
#
my1vfx := -y;
my1vfy := x;
my1vfz := 0;
#
my1fld := [my1vfx,my1vfy,my1vfz];
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 9) 3D plot of vector field (cartesian coordinates):);

#
fieldplot3d(my1fld,x=-gx..gx,y=-gx..gx,z=-gx..gx);
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 10) definition of vector field with unit length vectors (cartesian coordinates):);
#
my1vl := sqrt(my1vfx^2+my1vfy^2+my1vfz^2); # vector length
#
my2fld := [my1vfx/my1vl,my1vfy/my1vl,my1vfz/my1vl];
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 11) 3D plot of vector field with unit length vectors (cartesian coordinates):);
#
fieldplot3d(my2fld,x=-gx..gx,y=-gx..gx,z=-gx..gx);
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 12) definition of vector field with asked for length vectors (cartesian coordinates):);
#
mya := sqrt((sqrt(x^2+y^2)-my1r)^2+z^2);
c01r := sqrt(my2r^2-mya^2); # also used for domain restricting vector field below
#
my1tsz := solve([c01],[z]);
#
assign(my1tsz[1][1]);
my1tz := z;
unassign('z');
#
assign(my1tsz[2][1]);
my2tz := z;
unassign('z');
#
my1vp := c01r/my2r; # vector length (maximum one unit)
#
my3fld := [my1vp*my1vfx/my1vl,my1vp*my1vfy/my1vl,my1vp*my1vfz/my1vl];
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 13) 3D plot of vector field with asked for length vectors (cartesian coordinates):);
#
fieldplot3d(my3fld,x=-gx..gx,y=-gx..gx,z=-gx..gx);
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n(Section 14) same asked for vector field with 3-D arrow vectors:);
print(   );
print( (to get this to display properly it was necessary to do:  );
print( -> Maple 2017 -> Preferences... -> Precision ->   );
print(   [unselect] Limit expression length to   );
print(   Apply to Session);
print(   );
#
gr := 15;
#
P3 := fieldplot3d(my3fld,x=-gx..gx,y=-gx..gx,z=-gx..gx,arrows=3-D,grid=[gr,gr,gr]);
#
#
print( ------- ------- ------- ------- ------- ------- -------);
print(\n display asked for vector field within wireframe torus:);
#
display([P1,P3]);
#
#
print( ------- ------- ------- ------- ------- ------- -------);

## Integro-diffrential equation...

Hello,

How can i solve this integro-PDE(partial diffrential equation)??

regards...

eq := (1+6*(l/h)^2/(1+nu))*(diff(u(xi, tau), xi, xi, xi, xi)+int(-B*lambda*exp(-lambda(tau-s))*(diff(u(xi, s), xi, xi, xi, xi)), s = 0 .. tau))+diff(u(xi, tau), tau, tau) = alpha*(int((diff(u(xi, tau), xi))^2, xi = 0 .. 1)+int(-B*lambda*exp(-lambda(tau-s))*(int((diff(u(xi, tau), xi))^2, xi = 0 .. 1)), s = 0 .. tau))*(diff(u(xi, tau), xi, xi))+V^2*(sum(j*u(xi, tau)^(j-1), j = 1 .. 8))

## discrete variational computation...

Hi, I need to calculate some discrete variational problems, but it's a hard work just by hand.

Is there any toolboxes about the discrete variational computation? Or how to design a program to do that?

In particular, I need to realize the functions:

1. the linearized operator and the adjoint operator of some expressions.

For example:

the linearized operator of u(n,m+1)u(n+1,m) is u(n+1,m)Tm+u(n,m+1)Tn

(The latter is just the discrete Euler operator.)

Tm, Tn is the shift operator, T^(-1) is the inverse operator of T.

2. discrete Euler-Lagrange equation.

Thanks.

## how i can introduce!...

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

## 3D Bin Packing formulation...

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

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

3DbinPack2.mw

## garbled nonsense...

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?

## how to instruct Maple to get sol. of eq. (y ∂x-x ∂...

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.

## Strange output for Vector...

Here are two inocent Vectors.

 > V1 := Vector[row]([+, 1, 2]);
 (1)
 > V2 := Vector[row]([1, +, 2]);
 (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.

## How to replace a string by an expression in the ed...

I have many expressions in a worksheet like this:

latex(%, "equations.tex", append = true)

I should have defined a file name like this:

fname := "C:/home/MyStuff/Economics/MICRO NOTES/equations.tex"

And then replaced the first expression throughit the worksheet by:

latex(%, fname, append = true)

To acheive this I open the Find/Replace dialogue as in picture below:

This does not work. Instead of replacing with fname the result is "fname" .  Is there any way of doing what I want?

## A simple evalf/Int crashes Maple...

evalf(Int(x*(1-2*x^(3/10))^(10./3),x=0..1));  # Crashes Maple