## how can i add a line on the surface in a 3d surfac...

Hi, I'm a new user of Maple16.  I'm plotting a surface using plot3d and I'd like to add a line on the surface. You can see my unsatisfying attempt to do this below.  The line that shows in the third figure is basically what I want to show but I don't want the rest of the second surface at all, just the line visible on the first surface.

thanks

Tom

 >
 >
 >

I next want to add a line along the "ridge" in the figure. I'll try using a proc

 >
 >
 >
 >

 (1)
 >
 >
 >

I next want to add a line along the "ridge" in the figure. I'll try using a proc

 >
 >
 >
 >

## Why can't PDEtools/Solve handle system that solve ...

Hello, I have a simple system that I'm attempting to solve:

eq:={r*cos(c) = a, r*sin(c) = 0}:

If I pass this system to solve(eq, {r,c}), it correctly returns the results {c = 0, r = a}, {c = Pi, r = -a}. However, PDEtools:-Solve(eq, {r,c}) does not find a solution. Even adding the option 'solver'='solve' doesn't help.

According to its help page, PDEtools/Solve is a unified command for solving algebraic or differential equations, so I would expect it to easily handle this system. Is there an additional option I should be passing PDEtools/Solve to make it work like solve in this case?

Thanks!

## Wrong Results Returned...

The only difference between the code that works and the code that doesnt, is that in one Identity is rearranged to as such that the rhs is 0, i am really really curious to work out why this occurs, the only difference is that one evaluates to 1/2=1/2, and the other evaluates to 0=0, but i dont see why maple would return one of those evaluations as false

 >

CONJECTURE: c

CHALLENGE: FIND:

Numbers congruent to 2 or 3 mod 4.

 >

WHEN ALL TERMS ARE PLACED ON THE LHS AND 0 ON THE OTHER, THE OUTPUT PLACES ALL p,q IN THE SET T, AS I EXPECTED.

 >
 >
 >
 >
 >
 >
 >
 >
 (1)

BUT WHEN THE EQUALITY IS DEFINED AS FOLLOWS, SOME RESULTS ARE PLACED IN THE F SET. (INDICATING THE EQUALITY FOR ALL [p,q] is FALSE)

 >
 >
 >
 >
 >
 >
 >
 >
 (2)

BUT CHECKING THESE RESULTS 'MANUALLY' CONFIRMS THE EQUALITY IS INDEED TRUE FOR ALL ODD PRIME PAIRS  p,q.

 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >

## How to solve "Error, (in dsolve/numeric/process_in...

Hello,

I am trying to plot some movement equations, but the following error keeps happening:

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

when I tryed to rewrite the equation the error became:

Error, (in DEtools/convertsys) invalid specification of initial conditions

Can someone help me with those errors?

Here is the code:

restart;

with(LinearAlgebra);
with(linalg);
with(DifferentialGeometry);
with(VariationalCalculus);
with(Tensor);
with(tensor);
with(Tools);
DGsetup([t, x, y, z], M)

g1 := evalDG(N(t)^2*&t(dt, dt)-a(t)^2*(&t(dx, dx)+&t(dy, dy)+&t(dz, dz)))

g1inv := InverseMetric(g1)

C1 := Christoffel(g1)

RM1 := CurvatureTensor(C1)

RM1g := CurvatureTensor(g1)

ContractIndices(RM1, [[1, 3]])

ContractIndices(RM1g, [[1, 3]])

RT := RicciTensor(g1, RM1)

ContractIndices(RT, g1inv, [[1, 1], [2, 2]])

S1 := RicciScalar(g1, RM1)

ContractIndices(RT, g1inv, [[1, 1], [2, 2]])

RM1contra := RaiseLowerIndices(g1inv, RM1, [2, 3, 4])

RM1cov := RaiseLowerIndices(g1, RM1, [1])

Kret1 := ContractIndices(RM1contra, RM1cov, [[1, 1], [2, 2], [3, 3], [4, 4]])

eval(simplify(subs(N(t) = 1, Kret1)))

Lag := a(t)^3*N(t)*Kret1

phi = phi(t)

Lam := -(1/2)*a(t)^3*N(t)*((diff(phi, t))^2/N(t)^2+m^2*phi)

Ltot := Lag+Lam

EqELN := EulerLagrange(Ltot, t, N(t))

EqN := eval(simplify(subs(N(t) = 1, EqELN)))

Eqa := subs(N(t) = 1, Ltot)

tini := 0

with(DEtools)

with(plots)

tfin = 10

(D(a))(tini) = 0

((D@@2)(a))(tini) = 0

((D@@3)(a))(tini) = 0

phi := a^-3

Dphi := 0

(D(N))(tini) = 0

((D@@2)(N))(tini) = 0

((D@@3)(N))(tini) = 0

sys1 := {EqN, a(tini) = 0.1e-2, (D(a))(tini) = 0.1e-2, ((D@@2)(a))(tini) = 0.1e-2, ((D@@3)(a))(tini) = 1}

tfin = 2

p1 := dsolve(sys1, type = numeric, abserr = 1.*10^(-8), relerr = 1.*10^(-8), range = tini .. tfin)

figN := odeplot(p1, [t, a(t)])

sys2 := {EqELa, a(tini) = 0.1e-6, (D(a))(tini) = 0.1e-4, ((D@@2)(a))(tini) = 0.1e-5, ((D@@3)(a))(tini) = 1, ((D@@4)(a))(tini) = 0.1e-5}

p2 := dsolve(sys2, type = numeric, abserr = 1.*10^(-8), relerr = 1.*10^(-8), range = tini .. tfin)

figa := odeplot(p2, [t, a(t)])

## Plot with Maple 2015...

How do I plot the following with Maple 2015?

## 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.

## Invalid Neutral Operator Error...

Hi,

I'm really not sure what else to say that isnt already obvious from the worksheet i uploaded, it's pretty obvious what i am trying to do i just dont understand what neutral operator even is, and couldn't find anything on the help page i was directed to by the error.

 >
 >
 (1)
 >
 >

## Having trouble sorting my solutions...

I employed the sort command to sort through 10 solutions to a series of order 10.  However, I do not follow the logic of the output.  So I attempted to sort by ascending order by the magnitude, but I am getting errors which I am having trouble circumnavigating.  Can show me how to sort my solutions properly?

The worksheet is in my reply below.

## How to substitute this transformation in the given...

restart;
with(PDEtools);
assume(k::real, x::real, omega::real, t::real, theta::real, c::real);
tr0 := c*(t*upsilon+x) = xi;
tr1 := I*(k*x+omega*t+theta);
tr2 := phi(lhs(tr0))*exp(tr1);
PDE := proc (u) options operator, arrow; I*(diff(u, t))+diff(u, x, x)-I*sigma*u*(conjugate(u)*(diff(u, x))-u*(diff(conjugate(u), x))) end proc;
Eq1 := PDE(tr2);
Eq2 := simplify(convert(expand(subs(tr0, Eq1)), diff));

for_maple_prime.mw

## How do I create a bifurcation diagram for a system...

Hi, I'm currently studying the dynamics of a system of ODEs and I would like to plot a bifurcation diagram using Maple.

The system is:

.

Can anyone help me with a procedure to output a bifurcation diagram for the system?
Thanks.

## importing and exporting all digits from text file ...

Dear Users,

Recently, I started using Maple2017. In Maple 18, I have used the following commands for import/export and it worked fine.

Digits := 50;

Rhs:= ImportVector("/home/15_degree_3izto1_fixed/Vec.txt", source = delimited);

MatA:=ImportMatrix("/home/15_degree_3izto1_fixed/Mat.txt", source = delimited) ;

Note : Vec.txt contains float with 50 digits, and Mat.txt contains algebraic equation eg. 123456716798271394816*y+173974937*10^(-16)

While maple 18 used to import all the informations with 50 digits of accuracy, Maple2017 only import float[8] ?It only imports first 20 digits and so on..? What has changed in 2017?

Thanks and regards,

## how to eliminate this the find K?...

1.

with(Groebner):
K := {r-x^4,u-(x^3)*y,v-x*y^3,w-y^4};
G := Basis(K, 'tord', degrevlex(r,u,v,w));
R1 := eliminate(G, {r,u,v,w}); # eliminate is the reverse of Basis
Ga := Basis({a*G[1],a*G[2],a*G[3],a*G[4],a*G[5],a*G[6],a*G[7],a*G[8],a*G[9],a*G[10],a*G[11],a*G[12],a*G[13],a*G[14], (1-a)*K[1], (1-a)*K[2], (1-a)*K[3], (1-a)*K[4]}, 'tord', deglex(a,r,u,v,w));
Ga := remove(has, Ga, [x,y,a]);
eliminate(Ga, [r,u,v,w]);

how to eliminate Ga to find back K ?

2.

A1A2 and A3A4 parallel
A(0,0), B(u1,0), D(u2,u3), C(x1,x2), E(x3,x4)
#BC = A1A2
xx1 := u1:
xx2 := x1:
yy1 := 0:
yy2 := x2:
xx3 := 0:
xx4 := u2:
yy3 := 0:
yy4 := u3:
eq1 := (xx2 - xx1)*(yy4 - yy3) - (yy2 - yy1)*(xx4 - xx3);
(x1-u1)*u3-x2*u2;
#CD = A1A2
xx1 := x1:
xx2 := u2:
yy1 := x2:
yy2 := u3:
#AB = A3A4
xx3 := 0:
xx4 := u1:
yy3 := 0:
yy4 := 0:
eq2 := (xx2 - xx1)*(yy4 - yy3) - (yy2 - yy1)*(xx4 - xx3);
-(u3-x2)*u1;
with(LinearAlgebra):
#E is on the same line of AC
xx1 := x3:
yy1 := x4:
xx2 := 0:
yy2 := 0:
xx3 := x1:
yy3 := x2:
eq3 := Determinant(Matrix([[xx1,yy1,1],[xx2,yy2,1],[xx3,yy3,1]]));
-x3*x2+x1*x4;
#E is on the same line of BD
xx1 := x3:
yy1 := x4:
xx2 := u1:
yy2 := 0:
xx3 := u2:
yy3 := u3:
eq4 := Determinant(Matrix([[xx1,yy1,1],[xx2,yy2,1],[xx3,yy3,1]]));
-x3*u3+u1*u3-u1*x4+u2*x4;

sol := eliminate({eq1,eq2,eq3,eq4},[x1,x2,x3,x4]);

with(Groebner):
K := {(rhs(sol[1][1])-lhs(sol[1][1])),(rhs(sol[1][2])-lhs(sol[1][2])),(rhs(sol[1][3])-lhs(sol[1][3])),(rhs(sol[1][4])-lhs(sol[1][4]))};
G := Basis(K, 'tord', degrevlex(x1,x2,x3,x4));
R1 := eliminate(G, {x1,x2,x3,x4}); # eliminate is the reverse of Basis
Ga := Basis({a*G[1],a*G[2],a*G[3],a*G[4], (1-a)*K[1], (1-a)*K[2], (1-a)*K[3], (1-a)*K[4]}, 'tord', deglex(a,x1,x2,x3,x4));
Ga := remove(has, Ga, [u1,u2,u3,u4,a]);

From Question1, is it possible to find from sol to eq1, eq2, eq3 and eq4 ?

## How do i solve a partial differential equation wit...

restart;
with(PDEtools);
assume(k::real, x::real, omega::real, t::real, theta::real, c::real);
u := phi(c*(t*upsilon+x))*exp(I*(k*x+omega*t+theta));
PDE := proc (u) options operator, arrow; I*(diff(u, t))+diff(u, x, x)-I*sigma*u*(conjugate(u)*(diff(u, x))-u*conjugate(diff(u, x))) end proc;
Eq1 := PDE(u)

For example

if x*y*z+ x*y^2

after filter

x*y*z