Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,

I'm trying to define a simple forward difference operator Δ to act on a function f(n). I have defined, in a number of ways, Δ(f(n)) = f(n+1) - f(n). This works fine but I want Maple to calculate powers of Δ. e.g Δ2 (f(n))= f(n+2) - 2f(n+1) + f(n). As it stands, Maple returns (f(n+1) - f(n))2 seemingly however I define the functions.
What am I doing wrong? Help much appreciated.

DJF

When I input the following commands in a fresh document

with(VectorCalculus):

SetCoordinates(cartesianx,y,z)

cartesianx,y,z   (1)

Del(xy)

0ex   (2)

 

I get <0,0,0> when the answer is obviously <y,x,0>. What's going on?

Hi every one,

How can I get bouble Curl of this equation

 

 

 

In the above equation, the first term has the Laplacian, the second one has the gradient and in the term "k" is the unit vector and also u=(u1,u2,u3). sqrt(R) is a constant. 

 

Dear everyone.
I'm trying to substitute expressions which are represented by square root into eq.
But, it doesn't work well as shown in the below figure.

First, the 'a' is only substituted into numerator. I'd like to know how 'a' can be also substituted into denominator.
Second, the 'b' can be substituted as I ordered to Maple.

Advice would be appreciated . Thank you !  (If you need my maple code, this will be referred in the below.)

Hi,
I need to solve a big linear system (sparse, if it helps). I first used the "Matrices" and it worked perfectly, but then the matrix got bigger and I got the message "assigning to a long list, please use Arrays". So I learned how to manipulate Arrays and basically wrote the whole program again, but I couldn´t find how to solve A.X=B when A and B are Arrays. And it seems like nobody talks about that on the internet :( please don´t tell me that in 2012, with...

Let's see how we can display patterns, or even images, on 3D plot surfaces. Here's a simple example.

The underlying mechanism is the COLOR() component of a POLYGONS(), GRID(), or MESH() piece of a PLOT3D() data structure. (See here, here, and here for some older posts which relate to that.)

The data stored in the MESH() of a 3D plot structure can be a list-of-lists or, more efficient, an Array. The dimensions of that Array are m-by-n-by-3 where m and n are usually the size of the grid of points in the x-y plane (or of points in the two independent parameter spaces). In modern Maple quite a few kinds of 3D plots will produce a GRID() or a MESH() which represent the m-by-n independent data points that can be controlled with the usual grid=[m,n] option.

The plot,color help-page describes how colors may specified (for each x-y point pair to be plotted) using a procedure f(x,y). And that's fine for explicit plots, though there are some subtleties there. What is not documented on that help-page is the possibility of efficiently using an m-by-n-by-3 or an m*n-by-3 datatype=float[8], order=C_order Array of RGB values or am m*n float[8] Vector of hue values to specify the color data. And that's what I've been learning about, by experiment.

A (three-layer, RGB or HSV) color image used by the ImageTools package is also an m-by-n-by-3 Array. And all these Arrays under discussion have m*n*3 entries, and with either some or no manipulation they can be interchanged. I wrote earlier about converting ImageTools image structures to and from 2D density-plots. But there is also an easy way to get a 3D density-plot from an ImageTools image with a single command. That command is ImageTools:-Preview, and it even has a useful options to rescale. The rescaling is often necessary so that the dimensions of the COLOR() Array in the result match the dimensions of the grid in the MESH() Array.

For the first example, producing the banded torus above, we can get the color data directly from a densityplot, without reshaping/manipulating the color Array or using any ImageTools routines. The color data is stored in a m*n Vector of hue values.

But first a quick note: Some plots/plottools commands produce a MESH() with the data in a list-of-lists-of-lists, or a POLYGONS() call on a sequence of listlists (eg. `torus` in Maple 14). For convenience conversion of the data to a 3-dimensional Array may be done. It's handy to use `op` to see the contents of the PLOT3D() structure, but a possible catastrophe if a huge listlist gets printed in the Standard GUI.

restart:
with(ImageTools):with(plots):with(plottools):
N:=128:

d:=densityplot((x,y)->frem((x-2*y),1/2),0..1,0..1,
                      colorstyle=HUE,style=patchnogrid,grid=[N,N]):
#display(d);

c:=indets(d,specfunc(anything,COLOR))[1];

                         /     [ 1 .. 16384 Vector[column] ]\
                         |     [ Data Type: float[8]       ]|
               c := COLOR|HUE, [ Storage: rectangular      ]|
                         \     [ Order: C_order            ]/

T:=display(torus([0,0,0],1,2,grid=[N,N]),
           style=surface,scaling=constrained,axes=none,
           glossiness=0.7,lightmodel=LIGHT3):
#op(T); # Only view the operands in full with Maple 16!

# The following commands both produce the banded torus.

#op(0,T)(MESH(op([1,1..-1],T),c),op([2..-1],T)); # alternate way, M16 only

subsop([1,1]=[op([1,1],T),c][],T);

Most of the examples in this post use the command `op` or `indets` extract or replace the various parts of of the strcutures. Perhaps in future there could be an easy mechanism to pass the COLOR() Array directly to the plotting commands, using their `color` optional parameter.

In the next example we'll use an image file that is bundled with Maple as example data, and we'll use it to cover a sphere. We won't downsize the image, so that it looks sharp and clear (but note that this may make your Standard GUI session act a bit sluggish). Because we're not scaling down the image we must specify a grid=[m,n] size in the plotting command that matches the dimensions of the image. We'll use ImageTools:-Preview as a convenient mechanism to produce both the color Array as well as a 3D densityplot so that we can view the original image. Note that the data portion of the sphere plot structure is an m-by-n-by-3 Array in a MESH() which matches the dimensions of the m-by-n-by-3 Array in the COLOR() portion of the result from ImageTools:-Preview.

restart:
with(ImageTools):with(plots):with(plottools):
im:=Read(cat(kernelopts(mapledir),"/data/images/tree.jpg")):

p:=Preview(im):

op(1,p);

                 /                    [ 235 x 354 2-D  Array ]  
                 |                    [ Data Type: float[8]  ]  
             GRID|0 .. 266, 0 .. 400, [ Storage: rectangular ], 
                 \                    [ Order: C_order       ]  

                    /     [ 235 x 354 x 3 3-D  Array ]\\
                    |     [ Data Type: float[8]      ]||
               COLOR|RGB, [ Storage: rectangular     ]||
                    \     [ Order: C_order           ]//

q:=plot3d(1, x=0..2*Pi, y=0..Pi, coords=spherical, style=surface,
          grid=[235,354]):

display(PLOT3D(MESH(op([1,1],q), op([1,4..-1],p)), op(2..-1,q)),
           orientation=[-120,30,160]);
I am dealing with a problem in engineering mechanics, but my when using maple to solve the governing nonlinear equation with 4 bcs, I meet with error. 
Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

my code is :
deq := diff(y(x), `$`(x, 4)) = -.364*(diff(y(x), x))^2*(diff(y(x), `$`(x, 2)))+1.74*10^(-7)
bc := y(0) = 0, (D(y...

I have a collection of functions defined either in terms of a single variable - call it r - or in terms of (r and) the other functions of r.

To be more specific, there are two free functions B(r) and N(r), a function theta defined in terms of N(r) and B(r) (and their derivatives) and r, and a free function V(theta).

Finally I have a function, call it f, written in terms of B(r) and N(r) (and their derivatives), r, and V(theta) and its derivatives with respect to both theta and r.

How to convert Maple code to Matlab ?

comment je doiy faire pour convertir mon code Maple en Matlab?

merci d'avance pour votre aide.

Cordialement.

Hi,

 

I am trying to get maple to "simplify" the product of two infinite sums, according to Laurent's condition, as follows:

Given two Fourier series expansions,

F = sum{h=-inf..inf, f(h)*exp(i*h*x)}

G = sum{s=-inf..inf, g(s)*exp(i*s*x)}

 

Their product may be written as F*G, and then simplified as follows:

F*G

= sum{h=-inf..inf, f(h)*exp(i*h*x)} * sum{s=-inf..inf, g(s)*exp(i*s*x)}

= sum{h=-inf..inf, sum{s=-inf..inf, g(s...

conisder
 
>eq1:=n=(k[f1]^3+k[f2]^3)/6/Pi^2;


> eq2:=el*V=h_bar^2/2/m*(k[f2]^2-k[f1]^2);


> eq3:=solve({eq1,eq2},{k[f1],k[f2]});
 
> eq4:=allvalues(eq3):
Solving this i get a very very massive result. Let me take a branch:
 
eq5:=subs(eq4[2],k[f1]);
 
I get
 
1/h_bar*(-(1/2*n*Pi^2*h_bar^3/el/V/m+1/2*...

May I obtain, with Maple, an answer, true or false, about general questions of Logic and Set Theory?

i.e. Without constructing a Set, I want to know if is it true or false, that "if A is a subset of B and B is a subset of C then A is a subset of C".

 

Thanks in advance

 

Angelos58

What is the next two terms for this pattern...

1, -2, 2, -4, 0, ...

I'm trying to plot and fill the area between these two curves from x[0,450]

line1:=20-0.05*x

line2:=2+0.0002*x^2

 

I can do it separately but when I do them together, it gives me extra area that isn't shared between the two curves.

Also, whenever I try to plot them together I get the following error message:

Error, (in plot) unexpected option: 2+0.2e-3*x^2

 

Any help will be greatly appreciated!

hi guys,

say i have an expression like this:

First 1555 1556 1557 1558 1559 1560 1561 Last Page 1557 of 2224