Maple 2016 Questions and Posts

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

I'm attempting to solve the complex-valued differential equation

restart:
assume(t::real):

pde := diff(A(t),t) - I * conjugate(A(t))*A(t)^2 = 0:
dsolve(pde);

However, it seems Maple attempts to solve it using separation of variables and gives

t-Intat(-I/conjugate(_a)/_a^2,_a = A(t))+_C1 = 0

Unless I'm mistaken, a complex integral such as this isn't even defined without a contour.

Working the integral out by hand, I know the solution to be

_C1*exp(I*abs(_C1)*t)

Is there a trick I'm missing to get Maple to find this solution? Or is this outside the scope of what Maple can handle on it's own?

Thanks!

Please I am trying to get a compact result for this code in particular the lines assigne "a" and "b" respectively. I am sure the result shoud not be more than two lines. Can someone be of help? 

restart:
P:=a[0]+(a[1]*x)/(1+(a[2]*x)/(1+(a[3]*x))):
Q:=diff(P,x):
T:=diff(P,x,x):
e1:=simplify(eval(P, x=q))=y[n]:
e2:=simplify(eval(Q,x=q))=f[n]:
e3:=simplify(eval(Q,x=q+h))=f[n+1]:
e4:=simplify(eval(T,x=q+h))=g[n+1]:
var:=seq(a[i], i=0..3):
M:=e||(1..4):
Cc:=eval(<var>, solve(eval({M}),{var}) ):
for i from 1 to 4 do
	a[i-1]:=Cc[i]:
end do:
Cf:=P:
a:=y[n+1]=collect(simplify(eval(Cf, x=q+h)),[y[n], f[n], f[n+1],g[n+1]], recursive):
b:=map(eval@allvalues, [a]);

 

I'm receiving a very interesting error when attempting to solve a system of differntial equations:

{sqrt(2)*sqrt(F1(t))*diff(F2(t),t) = 0}:
% union {F3(t) = 0}:
pdsolve(%, {F1(t),F2(t),F3(t)});

When attempting to run this code, I get the following error:

Error, (in pdsolve/sys) invalid input: DifferentialAlgebra:-DifferentialRing expects value for keyword parameter blocks to be of type {undefined, Or(list({name, unknown, list({name,unknown})}),name,unknown)}, but received [F3, F2, _F1 = (NULL), F1 = [_F1, F1], _F2] 

Interestingly, removing the second line, or even the sqrt(2), allows the calculation to proceed correctly. It this a bug, or am I doing something wrong?

Thank you very much!

(I'm aware this would technically be a system of ODEs, not PDEs; my actual code includes additional partial derivatives. Additionally, dsolve appears to only generate a trivial solution in this case).

please how can I simplify the results of assigned K cum each of the coefficients further in the following code? the results are too large.

restart:
#k=2:
omega:=u/h:
psi:=v/h:
t:=(sum(a[j]*x^j,j=0..2)+a[3]*sin(omega*x)+a[4]*cos(omega*x)+a[5]*sin(psi*x)+a[6]*cos(psi*x)):
F:=diff(t,x):
G:=diff(t,x,x):
p1:=simplify(eval(t,x=q+h))=y[n+1]:
p2:=simplify(eval(F,x=q))=f[n]:
p3:=simplify(eval(F,x=q+h))=f[n+1]:
p4:=simplify(eval(F,x=q+2*h))=f[n+2]:
p5:=simplify(eval(G,x=q))=g[n]:
p6:=simplify(eval(G,x=q+h))=g[n+1]:
p7:=simplify(eval(G,x=q+2*h))=g[n+2]:
vars:= seq(a[i],i=0..6):
Cc:=eval(<vars>, solve({p||(1..7)}, {vars})):
for i from 1 to 7 do
	a[i-1]:=Cc[i]:
end do:
Cf:=t:

K:= collect(combine(simplify(eval(Cf,x=q+2*h),size),trig),{y[n+1],f[n],f[n+1],f[n+2],g[n],g[n+1],g[n+2]},factor):


alpha[1]=simplify(coeff(K,y[n+1]));
beta[0]=simplify(coeff(K,f[n]),size);
beta[1]=simplify(coeff(K,f[n+1]),size):
beta[2]=simplify(coeff(K,f[n+2]),size):
gamma[0]=simplify(coeff(K,g[n]),size):
gamma[1]=simplify(coeff(K,g[n+1]),size):
gamma[2]=simplify(coeff(K,g[n+2]),size):

 

For my own use, I am attempting to port Joe Riel’s glyph package for geometric algebra into a module more compatible with recent versions of Maple. To this end, I have been testing individual procedures extracted from the package into Maple 2016, both to understand the algorithms and to check for glitches caused by the code running in more current Maple 2016. The procedure for carrying out the exterior multiplication of blades does not seem to work reliably, and I haven’t the necessary knowledge of Maple language to determine whether this is due to an error on my part or a feature of Maple V that no longer works.  I have attached a worksheet,tablemultiplyexample.mw,  that includes the procedures necessary for the multiplication routine to work, but I can’t get any consistency in the results.  Can anyone advise me what is the problem?  

As I understand the routine, setup defines a anti-symmetric root blade table with an indexing function that precludes assignment to the table. Clifford blades are then represented as indexed variables using the root table. The process is as follows see worksheet for actual code):

initialize := proc ()
 global _e, tableroot;
tableroot := table(antisymmetric, blade);
tableroot[] := 1;
_e := tableroot;
end proc:
#The index function `blade` is as follows:

`index/blade` := proc (Indices, tableau)
 if nargs = 2 then if Indices = [] then 1
          else tableau[op(checkindices(Indices))] end if
elif Indices = [] then tableau[Indices[]] := 1
 else ERROR("cannot assign to a blade", Indices) end if
end proc;

#Exterior multiplication is performed by the following routine.
b_exteriorp := proc (u, v)
option remember;
 if  u = 1 or v = 1 then u*v
else _e[op(u), op(v)] end if
end proc:

As near as I understand, the procedure joins the lists representing the two input blade into a single list that is processed by the antisymmetric indexing function and outputs the indexes as the product blade. I don’t understand how the case of duplicate indexes (which should return 0) is supposed to be handled by the procedure.  What the procedure usually returns is simply the appended list of the two blades without modification by the indexing function.

Can anyone give me a hint about how to fix this procedure?

tablemultiplyexample.mw

The question is sort of convoluted, but I hope somebody can help.

I have a data set I pulled from an Excel Sheet of the temperature for every day for a year.

Currently, it's in an Array 365x2, where the first column is what day of the year it is and the second column is the temperature. I want to create a plot that on the x-axis shows the day, but on the y-axis shows the amount of a certain chemical in the trees. I have a function of temperature vs chemicals, but I want my graph to show the day of the year vs amount of chemical. How would I go about making such a plot? I don't know how to connect all three. 

 

Thanks!

hello guys,
in the bellow, screen shot that I have sent to you.
how can I solve this three equations and obtain a1 a2 a3??? in fact non zero answers.
also is this possible to learn me how to write my codes that I have written in maple in the form that others send to you for their questions??? I dont know how to do that...and send screen shot!!
thank you

Hello,

I am confused by the Syntax of maple. When does maple numerically evaluates an expression? I know that maple cannot distinguish the variable "e" from the exponential function "e". So I have to use the command palette or enter the 1-D sequence "exp(1)". Maple shows the symbols if not told otherwise. I can numerically evaluate the expression using "evalf(exp(1))". 

But if I enter "I^2" for example maple behaves in a different way. It does not show "I^2" but it evaluates the expression. Same with "2+2". Maple shows me the result "4". So when does Maple numerically evaluate an expression and when does not?

Second question: When I enter "evalf(exp((I*2)*Pi))" I get "1.". What is the meaning of the point? Using "evalc(exp((I*2)*Pi))" I do not get the point - just "1".

Thank you in advance!

 

Hi

Please download and check the attached file.
It seems when you run the code more than one time, various results are obtained each time.

What is the reason? How it can be fixed?

Thanks


 

restart; Digits := 20; tm := time(); with(LinearAlgebra); m := 6; a := .1; b := 10*a; E := 1; h := 1; nu := .3; ur := -w*z+u0; u0 := 0; ut := add(add(T[n, i]*r^n*t^(i-n), n = 0 .. i), i = 0 .. m); w := (r-b)^2*(r-a)^2*add(add(W[n, i]*r^n*t^(i-n), n = 0 .. i), i = 0 .. m); er := diff(ur, r); et := ur/r+(diff(ut, t))/r; ert := 1/2*(diff(ut, r)-ut/r+(diff(ur, t))/r); u := -(1/2)*E*(2*er*et*nu+er^2+et^2)/(nu^2-1)+2*E*ert^2/(2+2*nu); N := sum(i+1, i = 0 .. m); PI := int(int(int(u*r, z = -(1/2)*h .. (1/2)*h), t = 0 .. 2*Pi), r = a .. b)-.5*P*(int(int(r*(diff(w, r))^2, r = a .. b), t = 0 .. 2*Pi)); s1 := seq(indets(add(add(T[n, i], n = 0 .. i), i = 0 .. m))[k] = c[k], k = 1 .. N); s2 := seq(indets(add(add(W[n, i], n = 0 .. i), i = 0 .. m))[k] = c[k+N], k = 1 .. N); PI := subs(s1, s2, PI); for k to 2*N do diff(PI, c[k]); if % = 0 then ex := `union`({}, {k}) else eq[k] := % end if end do; NE := seq(ex[j], j = 1 .. numelems(ex)); M := GenerateMatrix([`$`(eq[j], j = 1 .. 2*N)], [`$`(c[j], j = 1 .. 2*N)])[1]; M := DeleteColumn(DeleteRow(M, NE), NE); Determinant(M); 12*fsolve(%, P = 0 .. 1)*(-nu^2+1)*a^2/(E*h^3); Time = time()-tm

Time = 85.363

(1)

``


 

Download Stability.mw

hello guys, I can't take the real part of this formula that you can see in the picture that I upload for you.
please help me!!!!!!!!
sorry for uploading photo...so surry

Plot3d in this worksheet calls a procedure which conditionally returns the values for a parametrically defined ellipsoid, but the plot command fails. However the procedure passes the correct list of parametric values when it is called directly.

Is there a way to call a procedure within plot3d which successfully plots a parametrically defined surface?

Plot3d_proc_parametric.mw

Hello, everybody,

If I had the graph of a function just like plot(sin(x), x=-2..2)

The question is I want to plot this function is discrite form    by the pair of points (x[i], sin9x[i]) and i=1...N, where N is an integer number

The edges of the red and blue surfaces are ragged. Can they be made smoother when displayed?

Intersecting_surfaces.mw

Supposing as a nice simple example I use the power series command,

series(ex, x=0,8)

to get,

1+x+12x+ 16x+ 124x+ 1120x+ 1720x+ 15040x7

Is there automated anyway to get this as a Sigma representation? 

Hello, I have been attempting to plot a sequence of arrows in order to display how the vectors of the Frenet-Serret frame change throughout an helix-like trajectory. I came up with the following:

(With p1 being a plot I made earlier)

for t from 0 by 0.1e-1 to 12.5663706144 do plots[display](p1, plottools[arrow](Vector([cos(t), sin(t), t/(7.5)]), Vector([-(1/2)*sqrt(2)*sin(t), (1/2)*sqrt(2)*cos(t), (1/2)*sqrt(2)]), .1, .2, .3, cylindrical_arrow)) end do

This plots the desired arrow representing the tangent vector; however, it creates a plot for each step, while what I want is for it to display the arrow on each step in the same plot (as an animation).

I have attempted using the seq command, but I can't seem to get it right.

plots[display](p1, plottools[arrow](seq([Vector([cos(t), sin(t), t/(7.5)]), Vector([-(1/2)*sqrt(2)*sin(t), (1/2)*sqrt(2)*cos(t), (1/2)*sqrt(2)]), .1, .2, .3, cylindrical_arrow], t = 0 .. 4*Pi, 0.1e-1)))

With this code, the sequence won't be able to be executed.

Any ideas on how to do this? How can I use the sequence command in combination with plottools[arrow]?

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