Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

Indeed wrong considering the fact that the expression is an operand in a Sum, where k ought to be considered an integer.
However, the simplified expression is not all bad:

eval(p(1),r=1);
ex1:=op([2,2,1],%);
limit(ex1,k=0)+limit(ex1,k=1);
#with result 1/2.

Indeed wrong considering the fact that the expression is an operand in a Sum, where k ought to be considered an integer.
However, the simplified expression is not all bad:

eval(p(1),r=1);
ex1:=op([2,2,1],%);
limit(ex1,k=0)+limit(ex1,k=1);
#with result 1/2.

Use value instead of simplify (or sum as you comment yourself):

value(eval(p(1),r=1));

But I don't know why simplify returns 1.

In looking into this I stumbled upon what clearly seems to be a bug.
This is your system sys with the same initial and boundary conditions.
restart;
sys := {diff(T(x, t), t) = diff(T(x, t), x, x)+(diff(u(x, t), x))^2, diff(u(x, t), t) = diff(u(x, t), x, x)};
BCs := {u(0,t)=sin(t), u(10,t)=0,T(0,t)=1, T(10,t)=0,u(x,0)=0,T(x,0)=0};
pds := pdsolve(sys, BCs, numeric, spacestep=1/50);
pds:-plot(T(x,t), x=0, t= 0..2*Pi); #OK
pds:-plot(u(x,t), x=0, t= 0..2*Pi); #OK
val:=pds:-value(output=listprocedure);
#The following ought to be a safe way to extract procedures for T(x,t) and u(x,t):
TT,uu:=op(subs(val,[T(x,t),u(x,t)]));
#However, somehow u and T got switched:
plot(TT(0,t),t=0..2*Pi); #plots u(0,t) !
plot(uu(0,t),t=0..2*Pi); #plots T(0,t) !
#When giving the dependent specifications u and T are in order:
valTU:=pds:-value([T(x,t),u(x,t)],output=listprocedure);
TT,uu:=op(subs(valTU,[T(x,t),u(x,t)]));
plot(TT(0,t),t=0..2*Pi);
plot(uu(0,t),t=0..2*Pi);

As in your question
http://www.mapleprimes.com/questions/149888-Why-Cannot--Maple-Solve-This-System
there is only the trivial solution f(t) = 0.
To check the result you can (with either version of ode) do
dsolve(ode[2]);
odetest(%,ode[3]);
collect(%,t,factor);
This has to be zero on an interval, from which it follows  that _C1 = 0, so f(t) = 0 all t, and thus u is constant.
I don't understand your talk about a triangle. If t is one side, sqrt(1-t^2) is  another, what are f and u?

Actually I tried `$`, but wouldn't have thought of trying ` $`.
As a third illustration the following two attempts to define procedures result in the same kind of error message.
p:=proc(` $`,$) ` $` end proc;
Error, parameter `` $`` is declared more than once in procedure p
q:=proc(x,x) x end proc;
Error, parameter `x` is declared more than once in procedure q



Actually I tried `$`, but wouldn't have thought of trying ` $`.
As a third illustration the following two attempts to define procedures result in the same kind of error message.
p:=proc(` $`,$) ` $` end proc;
Error, parameter `` $`` is declared more than once in procedure p
q:=proc(x,x) x end proc;
Error, parameter `x` is declared more than once in procedure q



Although this is related to something discussed in another thread, I think you ought to formulate the question here and in doing so make it as specific as possible.

@Markiyan Hirnyk So you are back to your old self.

@Markiyan Hirnyk So you are back to your old self.

@Markiyan Hirnyk Surely it is sufficient that M be negative definite for the system x' = M.x to be (asymptotically) stable. But negative (and positive) definiteness implies in particular that all the eigenvalues are real. That it is surely not necessary for the system to be stable.

@Markiyan Hirnyk Surely it is sufficient that M be negative definite for the system x' = M.x to be (asymptotically) stable. But negative (and positive) definiteness implies in particular that all the eigenvalues are real. That it is surely not necessary for the system to be stable.

Why do you want an answer to this (besides general curiosity)?
If the question has to do with stability of the system x' = M.x then a more relevant question is: What are the necessary and sufficient conditions on m and q for all eigenvalues of M to have negative real part?
For that question you can apply the Routh-Hurwitz criterion on the characteristic polynomial of M.
See ?PolynomialTools:-Hurwitz

Why do you want an answer to this (besides general curiosity)?
If the question has to do with stability of the system x' = M.x then a more relevant question is: What are the necessary and sufficient conditions on m and q for all eigenvalues of M to have negative real part?
For that question you can apply the Routh-Hurwitz criterion on the characteristic polynomial of M.
See ?PolynomialTools:-Hurwitz

@digerdiga Mistakingly in indicialeq I took the second argument to mean the name of the variable to be used in the indicial equation. Since I wanted the name r, I wrote indicialeq(ode2, r, 0, X(y));
And that produces r^3-3*r^2+2*r = 0.
However, the second argument has to be the name of the independent variable in the ode, in this case y.
My mistake.
In my comment above I deleted the passages you are quoting.

############################
The roots of the indicial equation are 1, 5/2, and 4. Two of them differ by an integer.
That is well known to complicate matters (see any book that covers series solutions, e.g. Boyce & diPrima or Coddington & Levinson). But the usual procedure works for 5/2 and for the larger of the two roots (i.e. 4).
For 5/2 we can proceed as I did in a comment to your original question:
eval(ode2,X(y)=y^(5/2)*u(y));
ode21:=collect(expand(%/y^(5/2)),diff,factor);
f1:=diffeqtorec(ode21, u(y), a(n));
sol1:=rsolve({f1,a(0)=a0,a(1)=a1},a(n),makeproc);
X1:=y^(5/2)*add(sol1(i)*y^i,i=0..3); #Truncated
#For the root 4 you can do the same thing with 4 taking the place of 5/2.
#For the root 1 which differs from 4 by an integer, there will be problems like the ones discussed earlier about division by zero. However, as it happens, there is the polynomial solution we found earlier.



First 166 167 168 169 170 171 172 Last Page 168 of 231