Maple 15 Questions and Posts

These are Posts and Questions associated with the product, Maple 15

I draw a 3d graph and now i want the table of this graph. how can we get a table from the data of a plotted graph.

May grapg was obtained from the following commands

 

restart;
plot3d(1/2*(q^(2*n)-5.*q^n+(2.*q-1)^n+3), q = 2 .. 15, n = 2 .. 20);
 

I am interested in taking a complex number and repeatedly raising it to a power and graphing the result to see if it looks cool (i think it will) to do this i wrote this program

iterativepower := proc (base, index, n)

local out, i;
out := vector(n+1, 1);

out[1] := base;

for i to n do out[i+1] := out[i]^index end do;

out;

end proc;


this can be run with:

iterativepower(2, 2, 5)


This doesn't return a vector, it returns the word out. Why is that, and how do i fix it?

Hi. Can anyone help me with this error, it says 

Error, (in unknown) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 

restart

Shootlib := "F:\MAPLE\3";

"F:MAPLE3"

(1)

libname := Shootlib, libname;

"F:MAPLE3", "C:\Program Files\Maple 2015\lib", "."

(2)

with(Shoot);

[shoot]

(3)

with(plots):

``

FNS := {`φp`(eta), f(eta), fp(eta), fpp(eta), fppp(eta), phi(eta), theta(eta), `θp`(eta)}

{`φp`(eta), f(eta), fp(eta), fpp(eta), fppp(eta), phi(eta), theta(eta), `θp`(eta)}

(4)

ODE := {diff(`φp`(eta), eta) = (-f(eta)*`φp`(eta)+K*phi(eta)*(1-phi(eta))^2)*Sc, diff(f(eta), eta) = fp(eta), diff(fp(eta), eta) = fpp(eta), diff(fpp(eta), eta) = fppp(eta), diff(fppp(eta), eta) = (-fppp(eta)-f(eta)*fpp(eta)+k1*(2*fp(eta)*fppp(eta)-fpp(eta)^2)+lambda*fp(eta)+(1+Fr)*fp(eta)^2)/(k1*f(eta)), diff(phi(eta), eta) = `φp`(eta), diff(theta(eta), eta) = `θp`(eta), diff(`θp`(eta), eta) = (-f(eta)*`θp`(eta)+y*f(eta)*fp(eta)*`θp`(eta))/(1/Pr-y*f(eta)^2)}

{diff(`φp`(eta), eta) = (-f(eta)*`φp`(eta)+K*phi(eta)*(1-phi(eta))^2)*Sc, diff(f(eta), eta) = fp(eta), diff(fp(eta), eta) = fpp(eta), diff(fpp(eta), eta) = fppp(eta), diff(fppp(eta), eta) = (-fppp(eta)-f(eta)*fpp(eta)+k1*(2*fp(eta)*fppp(eta)-fpp(eta)^2)+lambda*fp(eta)+(1+Fr)*fp(eta)^2)/(k1*f(eta)), diff(phi(eta), eta) = `φp`(eta), diff(theta(eta), eta) = `θp`(eta), diff(`θp`(eta), eta) = (-f(eta)*`θp`(eta)+y*f(eta)*fp(eta)*`θp`(eta))/(1/Pr-y*f(eta)^2)}

(5)

blt := 4.; 1; IC := {`φp`(0) = Psi, f(0) = 0, fp(0) = 1, fpp(0) = 0, fppp(0) = alpha, phi(0) = 0, theta(0) = 1, `θp`(0) = beta}

4.

 

{`φp`(0) = Psi, f(0) = 0, fp(0) = 1, fpp(0) = 0, fppp(0) = alpha, phi(0) = 0, theta(0) = 1, `θp`(0) = beta}

(6)

BC := {fp(blt) = 0, fpp(blt) = 0, phi(blt) = 1, theta(blt) = 0};

{fp(4.) = 0, fpp(4.) = 0, phi(4.) = 1, theta(4.) = 0}

(7)

``

infolevel[Shoot:-shoot] := 1:

.7

 

1.0

 

.2

 

.2

 

1.0

 

.3

 

.5

 

.3

(8)

S := shoot(ODE, IC, BC, FNS, [alpha = 3.0125, beta = -2.31, Psi = -0.])

shoot: Step #  1

shoot: Parameter values :  alpha = 3.0125 beta = -2.31 Psi = -0.

Error, (in unknown) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 

p := odeplot(S, [eta, fp(eta)], 0 .. 15)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

display(p)

Error, (in plots:-display) expecting plot structure but received: p

 

p2 := odeplot(S, [eta, theta(eta)], 0 .. 10)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

display(p2)

Error, (in plots:-display) expecting plot structure but received: p2

 

p3 := odeplot(S, [eta, phi(eta)], 0 .. 10)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

display(p3)

Error, (in plots:-display) expecting plot structure but received: p3

 


 

Download Darcy.mw

Hi,

I am having trouble with the syntax for entering a limit of a multivariate function with direction specifiers.

For a single variate function f(x) the limit for x -> a from the right is specified by

limit(f(x),x=a,right)

A limit of a multivariate function f(x,y) for x -> a and y -> b can be entered by

limit(f(x,y),{x=a,y=b})

However I do not know how to specify directions in this case. Say, I want x to approach a from the right, and y to approach b from the left. What is the syntax to do this?

Cheers!

 

 

 

I have two lists, A and B, with the same number of elements and I want A to be on the Y-axis and B on the X-axes and do a point plot

When I use the Groebner package I normally use it something like this:

with(Groebner):
F≔[x3−3xy,x2y−2y2+x]
Basis(F,plex(x,y))

Does this calculate a reduced Groebner basis or just a Groebner basis? The output looks reduced to me, and I'm sure that I've seen people treat it is as a reduced GB; but the help page doesn't confirm this. Interestingly i can't seem to find any other mention of reduced bases in the help documentation - which makes me think that this method does it (because otherwise people would want a seperate algorithm specifically for getting reduced GBs)

Hi,

I am trying to do a simple numerical calculation, and need to evaluate functions on a grid. I woult then like to build expression like finite differences, such as

Y[ i + 1 ] - Y[ i - 1 ]

where Y is my Array of function values. However I would then always get the "Error, bad index into Array", even though in the expressions I build i is specified as a summation index over a certain range. Interestingly, indexing with an i works though within the sequence command: seq( Y[ i ], i = 1..n) would produce an output.

I am not sure what is going on.

Thanks for Help!

EDIT

I could solve my problem already. I edit in the solution at the end, in case some one ever runs into the same issue, and is happy finding this post when searching for a solution.

/EDIT

 

Hi there!

I am starting to learn how to use the Optimization package. The help page for the NLPSolve command contains the example

NLPSolve(sin(x)/x, x=1..30)

which would spit out the local minumum at x=23.519… with value -0.042… .

I tried to use the initialpoint option in order to solve for other local minima or maxima, but regardless which initial point choose, I get

Warning, initial point option ignored by solver

and again the same local minimum as before. I entered the option as follows:

NLPSolve(sin(x)/x, x=1..30,initialpoint={x=17})

I am not sure why it doesn't work, since the NLPSolve help page contains an example using the initialpoint option right underneath this example, and there everything works as intended.

Does anyone know what is going on here?

Cheers!

 

EDIT

The problem was that NLPSolve uses the quadratic interpolation method by default if the function which should be extremised is univariate and unconstrained. This information can be found under the Optimization/General/Methods help page. This method however, is the only one which doesn't accept an initialpoint. Hence, the solution is to apply a different method, such as

NLPSolve(sin(x)/x, x=1..30,initialpoint={x=17},method=modifiednewton)

/EDIT

Hi there,

I am looking at the system of equations

0=2*r*(H*(2-H)-3*sin(theta)^2)

0=-3*sin(2*theta)

with

H=sqrt(1-2*r*cos(theta))

Using the solve command with the assumption r >= 0 gives the solutions [r=0, theta=0], [r=1/2, theta=0] and [r=3/2, theta=pi].

However [r=0, theta=pi/2] is also a solution, which the solve command doesn't give me. Why not, and why doesn't if even give a warning that there are more solutions, which are not given?

Cheers!

 

Supposing I have a n x n matrix and I want to convert it from linear to subscript indices

I would like to make a Monte Carlo 2-D ising model but I am clueless on how I should start and so I would appreciate any advise/guidlines on this.

Given a list with sublists e.g.

[[a,b],[[c,d,e]]]

is there a way of merging everything into a single list, for example

[a,b,c,d,e]

Hi there!

In order to keep the code more readable, and to spare myself some brackets, I am trying to use the function composition to write

simplify(eval(f(x),x=a))

as

simplify@eval(f(x),x=a))

but it doesn't work. How would I do it the right way? (I am coding in 2D math)

 

Thanks for help!


 

1 .. Nonlinear*Fractional*KdV*equation

PDE1 := D[t]^alpha*u(x, t)-3*(u^2)[x]+u[xxx] = 0;

D[t]^alpha*u(x, t)-3*(u^2)[x]+u[xxx] = 0

(1)

"u(x,0)=6*x         0<alpha<=1, t>0"

Error, missing operation

"u(x,0)=6*x         0<alpha<=1, t>0"

 

``

``

2.*linear*time*fractional*diffusion*equation

2.*linear*time*fractional*diffusion*equation

(2)

``

PDE2 := diff(u(x, t), [`$`(t, alpha)]) = diff(u(x, t), x, x)

diff(u(x, t), [`$`(t, alpha)]) = diff(diff(u(x, t), x), x)

(3)

"IC:= u(x,0):=sinx , 0<alpha<=1 , t>0"

Error, unable to parse

"IC:= u(x,0):=sinx , 0<alpha<=1 , t>0"

 


 

Download kdv.mw

1 2 3 4 5 6 7 Last Page 2 of 46