Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@Kitonum I suspect that he wishes to get 

I don't know of a short way of getting there.

@dharr In a spearate thread here, the OP asked the same question and I provided a solution that agrees with his expected answer.  The main reason for discrepancy between your solution and his is that there is a typo in his PDE.

@arshl In a separate discussion here, dhar provided a pretty much complete answer to your question.  Here is a slightly tweaked version of his answer.  The differences are: (1) the initial condition needs to be clamped down on the negative x axis.  I have done that with applying the Heaviside function; and (2) it is apparent from your expected answer that you have a typo in the PDE — the (1+2*t) factor should be outside the exponent.  After those changes, Maple's answer agrees with the one that you are expecting.

restart;

with(inttrans):

interface(imaginaryunit=i):

PDEtools:-declare((U)(omega,t)):

` U`(omega, t)*`will now be displayed as`*U

pde := diff(u(x,t),t) + diff(u(x,t),x,x) + u(x,t) - exp(-x)*(1+2*t) = 0;

diff(u(x, t), t)+diff(diff(u(x, t), x), x)+u(x, t)-exp(-x)*(1+2*t) = 0

ic := u(x,0)= x*Heaviside(x);

u(x, 0) = x*Heaviside(x)

bc := u(0,t)=t, D[1](u)(0,t)=exp(-t)-t;

u(0, t) = t, (D[1](u))(0, t) = exp(-t)-t

inttrans:-laplace(pde, x, s):
eval(%, {bc}):
subs(s=i*omega, %):
eval(%,laplace(u(x,t),x,i*omega)=U(omega,t));

-exp(-t)+t-I*omega*t-(1+2*t)/(1+I*omega)+diff(U(omega, t), t)-omega^2*U(omega, t)+U(omega, t) = 0

inttrans:-fourier(ic,x,omega):
eval(%, fourier(u(x,0),x,omega)=U(omega,0));

U(omega, 0) = I*(Pi*Dirac(1, omega)*omega^2+I)/omega^2

 

Download zz.mw

@nm OK, I see. Thanks.

I suppose that your parsing algorithm should be able to figure out that the degree is undefined in the case of the equation of the simple pendulum, d2x / dt2 + sin x = 0.

Note added later:

The degree is undefined for both d2x / dt2 + sin x = 0  and  dx / dt + sin x = 0, but the first one is not solvable in terms of elementary functions, while the second one is. 

What is the meaning of the degree of a differential equation, and why is it of interest? Just curious to know.

@Carl Love 

  1. The section titled  Round-off and simple triggers in the help page ?dsolve,numeric,Events addresses the numerical discretization issue and suggests a way for obtaining an accurate value for the time when an event occurs.  I don't quite understand that section, and found no illustrative examples. If you or someone else can figure it out, I will be happy to learn.
  2. The time of an event's trigger can be accessed just by executing the proc returned by dsolve.  In the example above, doing dsol(1) returns the list
        [x = 0.155008799031827, f(x) = 0.500000000000000]
    from which one may extract the x value.

 

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

 

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