Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear all

I have problem related to collection of coefficient of differtials in differential expression containing multiple dependent variables and we want to collect coefficient wrt to selected dependent variables. Please see attached Maple file for details.

 


with(PDEtools):

DepVars := [u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]

[u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]

(1)

alias(u = u(x, t), v = v(x, t), a[1] = a[1](t), a[2] = a[2](t), a[3] = a[3](t), b[1] = b[1](t), b[2] = b[2](t), b[3] = b[3](t), r = r(x, t), s[1] = s[1](x, t), p[1] = p[1](x, t), s[2] = s[2](x, t), p[2] = p[2](x, t))

u, v, a[1], a[2], a[3], b[1], b[2], b[3], r, s[1], p[1], s[2], p[2]

(2)

Suppose we differential expression like:

a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]+diff(p[1], t)+a[3]*(diff(p[1], x, x, x))+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]-3*(diff(r, x))*p[1]+(diff(a[1], t))*u*(diff(u, x))+(diff(a[2], t))*v*(diff(v, x))+a[2]*(diff(v, x))*p[2]+a[2]*v^2*(diff(s[2], x))+a[2]*v*(diff(p[2], x))+a[1]*u*(diff(p[1], x))+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))+3*a[3]*(diff(s[1], x))*(diff(u, x, x))+3*a[3]*(diff(s[1], x, x))*(diff(u, x))+a[3]*(diff(r, x, x, x))*(diff(u, x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+a[3]*(diff(s[1], x, x, x))*u+3*a[3]*(diff(r, x, x))*(diff(u, x, x)) = 0

3*a[3]*(diff(diff(r, x), x))*(diff(diff(u, x), x))+3*a[3]*(diff(s[1], x))*(diff(diff(u, x), x))+3*a[3]*(diff(diff(s[1], x), x))*(diff(u, x))+a[3]*(diff(diff(diff(r, x), x), x))*(diff(u, x))+a[3]*(diff(diff(diff(s[1], x), x), x))*u+diff(p[1], t)+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-3*(diff(r, x))*p[1]+a[3]*(diff(diff(diff(p[1], x), x), x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]+a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))+(diff(a[1], t))*u*(diff(u, x))+a[1]*u*(diff(p[1], x))+a[2]*v*(diff(p[2], x))+a[2]*v^2*(diff(s[2], x))+a[2]*(diff(v, x))*p[2]+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+(diff(a[2], t))*v*(diff(v, x)) = 0

(3)

We can collect coefficients of differential like u[x], u[x, x], v[x], u, vin following manner:

The Procedure

   

 

 

Now how can we collect coefficents with respect to u[x], u[x, x], v[x], u, vso that differential expression (3) appear as
"(......)*u+(.......)*v+(......)*u[x]+(........)*uu[x]+(.........)vv[x]+(........)u[xx]  =0....................."????????""

``


Download Collecting_Coefficients_in_Differential_Expression.mw

Regards

We are running Maple16 in a virtual lab setup using Citrix, when exporting to PDF and saving the file to the local machine the PDF comes out as a 0kb file and the PDF is corrupt.  Has anyone else had an issue like this before?

without _Y(t) and DESol?

f := diff(u(t), t$2) + (2/t-1/t^2*p(1/t))*diff(u(t),t) + 1/t^4*q(1/t)*u(t) = 0;
dsolve(f,u(t));
u(t) = DESol({q(1/t)*_Y(t)/t^4+(2/t-p(1/t)/t^2)*(diff(_Y(t), t))+diff(_Y(t), t, t)}, {_Y(t)})

just would like to find u1 and u2 solution

In Mathematica I've a function which allows me to send a mail. I use it when I run some long time computations and I want to get an information that they are finished, etc. Is there any way to do the same thing in maple?

 

 

Hi!I am running some grid computations and I found that I could speed up my computations if my nodes could share some partial results. It seems that Grid:-Send and Grid:-Receive is almost perfect. The problem is that Grid:-Receive blocks the computations where I cannot ensure that a message will ever be send. I've tried to run Grid:-Receive on a thread in an possible infinite loop but it still blocks.

Some pieces of code below:

SignatureReciever:=proc(SigContainer::uneval,stopValue::uneval)
  while eval(stopValue) do
    SigContainer := eval(SigContainer) union {convert(Grid:-Receive(),string)};
  end do;
end proc:

SendMessage:=proc(message::string, id::integer)
  Threads[Seq](proc(i) if i <> id then Grid:-Send(i,message) end if end proc,i=0..Grid:-NumNodes()-1);
end proc:

In the main procedure run on a node I have

Threads:-Create(SignatureReciever('Signatures','stopValue'));

....

....

SendMessage(signature,id);

....

....

stopValue := false;

 

Do you have any suggestions how to solve my problem?

hi.how i can allocate infinite value for a parameter such as N ,which is attached below ( N := infinite) .i encounter with error.please see it and help

thanks..

 

restart; Digits := 55; a := 0; m := 1; n := 1; x[0] := 0; a := 0; h1 := proc (theta) options operator, arrow; cos(n*theta) end proc; h3 := proc (theta) options operator, arrow; cos(n*theta) end proc; h2 := proc (theta) options operator, arrow; sin(n*theta) end proc; N := infinite; `#mover(mi("z"),mo("&circ;"))` := z+z__c; z__c := (1/2)*h; `&lambda;__c` := E__c*`&upsilon;__c`/(-`&upsilon;__c`^2+1); `&mu;__c` := E__c/(2*(1+`&upsilon;__c`)); `&eta;__c` := E__c/(-`&upsilon;__c`^2+1); `&lambda;__m` := E__m*`&upsilon;__m`/(-`&upsilon;__m`^2+1); `&mu;__m` := E__m/(2*(1+`&upsilon;__m`)); `&eta;__m` := E__m/(-`&upsilon;__m`^2+1); E__m := 42.9*10^9; `&upsilon;__m` := .325; `&rho;__m` := 6020; E__c := 170*10^9; `&upsilon;__c` := .25; `&rho;__c` := 4640; h := 10^(-9); R := 10*h; L := 20*R; `&ell;` := 0; f := 0; `&epsilon;__r` := 0; `&epsilon;` := 8.8541878176*10^(-12)*`&epsilon;__r`; f__z := 0; `f__&theta;` := 0; f__x := 0; lambda := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&lambda;__m`-`&lambda;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&lambda;__c` end proc; mu := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&mu;__m`-`&mu;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&mu;__c` end proc; rho := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&rho;__m`-`&rho;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&rho;__c` end proc; eta := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&eta;__m`-`&eta;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&eta;__c` end proc; `D__1,0` := int(eta(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `D__1,1` := int(eta(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `D__1,2` := int(eta(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); `D__3,0` := int(lambda(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `D__3,1` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `D__3,2` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); `D__5,0` := int(lambda(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `D__5,1` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `D__5,2` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); `I__1,0` := int(rho(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `I__1,1` := int(rho(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `I__1,2` := int(rho(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); with(Student[Calculus1])

[AntiderivativePlot, AntiderivativeTutor, ApproximateInt, ApproximateIntTutor, ArcLength, ArcLengthTutor, Asymptotes, Clear, CriticalPoints, CurveAnalysisTutor, DerivativePlot, DerivativeTutor, DiffTutor, ExtremePoints, FunctionAverage, FunctionAverageTutor, FunctionChart, FunctionPlot, GetMessage, GetNumProblems, GetProblem, Hint, InflectionPoints, IntTutor, Integrand, InversePlot, InverseTutor, LimitTutor, MeanValueTheorem, MeanValueTheoremTutor, NewtonQuotient, NewtonsMethod, NewtonsMethodTutor, PointInterpolation, RiemannSum, RollesTheorem, Roots, Rule, Show, ShowIncomplete, ShowSolution, ShowSteps, Summand, SurfaceOfRevolution, SurfaceOfRevolutionTutor, Tangent, TangentSecantTutor, TangentTutor, TaylorApproximation, TaylorApproximationTutor, Understand, Undo, VolumeOfRevolution, VolumeOfRevolutionTutor, WhatProblem]

(1)

NULL

 

 

infinite.mw

Tengo una figura obtenida con ScatterPlot3D a partir de una Matriz de 3 dimensiones ( X,Y,Z ). ¿ Cómo puedo obtener la función polinómica z(x,y) que reprenta la superficie que se obtiene en el ScatterPlot3D ?

Hello,

I am trying to plot 3d scattered data as a 2d scatterplot with the third dimension being displayed as colour or a line that separates the value of the two functions (for example, the higher value and lower value at that point). I attached the file. I have two functions and several parameters that are constant. Here, I want to use P[A] on the x-axis, and P[B] on the y-axis. The z dimension is the profit functions, either Profit[1] or Profit [2]. I want to show them in colors like the highest one is red and the lower one is green, or something similar.  P[A] and P[B] are probability values and P[B] is between 0 to 0.50 with 0.01 increments, while P[A] is always less than P[B]. The file is here: example_file.mw

Example;

P[A] := 0 ..P[B]-0.01

P[B] := 0 ..0.50

Anyone please help me to code this problem.Thanks,

YC

Hey

I have a simple question. 

In maple - when working with Ohm's Law.

Maple know how to calculate with e, but how can I show the result

I have calculated the following calculation:

(2e-4)/2

Maple returns the result:0.0001000000000

How do I maple show the result as 1e-4?

 

Hello all,

I am pretty new to Maple, but I am trying to understand something. I was able to find a numerical solution to a PDE in maple (with some community help, thanks guys!). I am trying to manipulate this data but am struggling with it. I thought if I could take this data to matlab it would be pretty easy for me to manipulate and do what I want. 

So my question is: How do I export my numerical solution (pds module) to matlab. Just taking the data is okay. I know you can evaluate the data at some points. 

 

I see there is "Matlab" command that converts code, it doesn't seem to like pds as an input though.

I also see an export matrix command. I guess it could be possible to create a matrix of plot data and convert it this way?

 

I had to do a change of coordinate system to solve the PDE because of boundary conditions. I'm trying to transform this data back to my regular x,y coordinate system to see if it matches some other simulations. 

Thanks in advance! And here is my file.


restart;
with(Physics):
Setup(mathematicalnotation = true):

V(Z, f);

If function ( varphi) is defined, use this one.

PDE1 := subs[inplace](x = xi*varphi(t), PDE1);
If function ( varphi) is defined, use this one.


PDE1 := subs[inplace](t = 2*vartheta*(1/omega), PDE1);


 

 

 

 

 

 

Thesis_Pde2_attempt.mw

 from galois group function's result?                                     

g[1] := (diff(a(t), t))/(t^2-1) = 1;
g[2] := (diff(a(t), t))*(diff(b(t), t)) = 1;
dsolve({eq2, eq3});
with(DynamicSystems):
sys := DiffEquation([g[1]=1, g[2]=1], inputvariable = [b(t)], outputvariable = [a(t), b(t)]):
ts := 0.1:
t_sim := 10.0:
#in_t := Sine(1, 1, 0, 0):
#in_z := Sine(1, 1, 0, 0, samplecount = round(t_sim/ts), sampletime = ts, discrete):
in_t := t:
sol := Simulate(sys, [in_t]):
p1 := plots[odeplot](sol, [[t, a(t)]], t = 0 .. t_sim, numpoints = 200, color = red):
Error, (in DEtools/convertsys) unable to convert to an explicit first-order system
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

would like to draw the graph of x^2-1

with below sys instead of x^2-1 

sys := {-(1/2)*(-x-1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), b))/x^2+(diff(y(a, b), a))*(diff(y(a, b), b)), (1/2)*(x+1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), a))/x^2+(x^2+x+1)/x^4, (1/2)*(x+1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), a))/x^2-(1/2)*(-x-1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), b))/x^2+(x^2+x+1)/x^4};
IBC:={x=1,y(a,3)=(3-1)*(3+1),y(0,b)=0,y(1,b)=0}:
pds:=pdsolve(sys,IBC,numeric,spacestep=140);
plots[display]([seq(pds:−plot(v,t=i10),i=0..5)]):

 

I have a .mpl file containing some procedures and other code.
When I open the file, everything is placed in a single execution group
(I use 1D math, worksheet mode).

Is it possible to have distinct execution groups?
For example, after each two blank lines (or other separator) in the .mpl file.

The same question when using .txt files as Maple input (in this case the code being not executed).

Thank you.

Hi,

When I execute the command

series(exp(x),x)

and then refer to the equation in a new execution group using a equation label (CTRL-L on Windows), the equation is shown in Maple 18, but in Maple 2015 I get an error message: 'Error, missing operator or ';'. Using the % instead does work for both versions.

Is this intended behaviour or a bug in Maple 2015?

Thanks,

Bart

First 152 153 154 155 156 157 158 Last Page 154 of 2097