Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@student_md Then perhaps you can start with something like this:

restart;
local Psi;
N := 4;
Psi := unapply(Vector(N, i->psi[i](x)), x);
C := Matrix(N,N, symbol=c);
Psi(x)^+ . C . Psi(t);    # This is the right-hand side of your equation (2)

 

As far as I know, Maple doesn't do symbolic matrix algebra, so you are out of luck here.  But suppose that it did, and you arrived at equation (9).  Where would you go from there? Just curious.

Aside: Maple can do matrix algebra if matrices and vectors are specified in components.  Thus, you may specify the size N of the vectors and then take Psi to be a vector with components psi[i], i=1..N.

 

@Abdoulaye I don't see a way of going forward with this method.  What is the actual problem that you wish to solve?  Perhaps if you just state the problem, then someone may suggest a different approach to solving it.

 

@Abdoulaye That's good, but my question still remains. -- g(U) depends on y, and therefore the solution U1((x) of g( U1(x) ) = x is a function of both x and y.  Shouldn't that be written U1(x,y)?

Similarly all Un(x) should be Un(x,y).

 

You say:

i) We define g( U ) = U + S1( 2*y*exp(-U) )

ii) We find the function U(x) solution of g( U1(x) ) = x

But g(U) depends on y, therefore the solution of g(U) = x will depend on both x and y.  Then it appears that what you call Un(x) should be Un(x,y).  Just wanted to point this out.

 

@acer I see your point now.  Thanks for the explanation.

 

@acer You state "I don't see why it's necessary to call expand here", then in your code you replace expand with collect:

collect((rhs-lhs)(eqn),diff)

So yes, expand isn't necessary as long as you use collect in its stead.  But I don't find that particularly noteworthy.  Perhaps I am missing something subtle here.
 

@Joe Riel This should work:
 

selectremove(has, tmp, diff);
%[1]=-%[2];

 

Edgardo, I can't say that I fully comprehend the complete functionality of casesplit, but what you have shown is certainly instructive and impressive.  Thanks!

I find the casesplit's help page somewhat difficult to digest.  It begins with a longish paragraph focusing on singular solutions and singular systems, which can divert the reader's attention from all other neat things that casesplit does.  Perhaps it will be better to open with a bulleted list of brief (one-line) sentences describing casesplit's various capabilities, and only later go into the details.

I would also suggest to give, as the first example, something very simple, such as:

de1 := diff(x(t),t) = a*x(t) + b*y(t);
de2 := diff(y(t),t) = c*x(t) + d*y(t);
casesplit({de1,de2});

which the casual reader can readily comprehend without much head-scratching.  The more tricky examples can come later.

One more thing: At the very top of the help page we have "casesplit: split into cases and sequentially decouple a system of equations...".  It will be good to replace "equations" with "ordinary or partial differential equations".

Also just below that, where the "sys" parameter is defined, it says "sys: single DE, or list or set of DEs; any system of differential equations".  This can give the false impression that casesplit deals with ODEs only.  It'd be good the change "set of DEs" to "set of ODEs or PDEs" to make it clear that PDEs are included as well.

 

@Kitonum A more interesting result is obtained with tbas=10.

@Carl Love Ordinarily I would pick the initial guess as you have, but in this case such a choice makes the iteration arrive at the fixed point in a single step.  I picked my initial guess on purpose so that it takes a few iterations to arrive at the fixed point, and thus to illustrate how the iteration works.

As to a "best choice", I don't have a useful answer other than making the obvious point that the "best choice" is the solution itself.  In this problem it would have been u[0](t,x) = 1 + x + t + x*t, which is better than u[0](t,x) = 1 + x.

 

You ask "how can I iterate this PDE?" but you haven't shown the PDE.  The iterative formula in your worksheet is misformed and ambiguous, making it difficult/impossible to deduce the PDE from it.

Show the PDE.

 

@Carl Love Yes, you are right.

    Kbt1 and mubt1 are defined as functions but used as if they were expressions.
    Fht1 is defined as an expression but used as if it were a function.

There may be more such errors.

@Paulo Baumbach:  You can make your programming job significantly easier if you write a single statement per execution group.  Ask for explanation if you don't know what an execution group means.

 

Tom, you are not alone.  I am not receiving notifications either.  Something has stopped working on this website.

 

@Rouben Rostamian  Come to think of it, that was pretty dumb. The differential equation is linear, and is therefore solvable symbolically.  Why not just plot the symbolic solution?

restart;

de := diff(B[1](t),t) = piecewise(t < 1000, kaC*(R-B[1](t)) - kd1*B[1](t), -kd1*B[1](t));
 

de := diff(B[1](t), t) = piecewise(t < 1000, kaC*(R-B[1](t))-kd1*B[1](t), -kd1*B[1](t))

dsol := dsolve({de, B[1](0)=0}, B[1](t));

dsol := B[1](t) = piecewise(t < 1000, kaC*R*exp((kaC+kd1)*t)*exp(-kaC*t-kd1*t)/(kaC+kd1)-exp(-kaC*t-kd1*t)*kaC*R/(kaC+kd1), 1000 <= t, -exp(-kd1*t-1000*kaC)*kaC*R/(kaC+kd1)+kaC*R*exp(1000*kaC+1000*kd1)*exp(-kd1*t-1000*kaC)/(kaC+kd1))

eval(dsol, {R=1, kaC=6e-1});
simplify(%);
plot3d(rhs(%), kd1=0..1, t=0..2000);
 

B[1](t) = piecewise(t < 1000, .6*exp((.6+kd1)*t)*exp(-t*kd1-.6*t)/(.6+kd1)-.6*exp(-t*kd1-.6*t)/(.6+kd1), 1000 <= t, -.6*exp(-t*kd1-600.0)/(.6+kd1)+.6*exp(600.0+1000*kd1)*exp(-t*kd1-600.0)/(.6+kd1))

B[1](t) = piecewise(t < 1000, 3.-3.*exp(-(.6+kd1)*t), 1000 <= t, -3.*exp(-t*kd1-600.)+3.*exp((1000.-1.*t)*kd1))/(3.+5.*kd1)


 

Download mw.mw

First 47 48 49 50 51 52 53 Last Page 49 of 99