patient

35 Reputation

2 Badges

10 years, 101 days

MaplePrimes Activity


These are replies submitted by patient

@Preben Alsholm

I really learned a lot from you.

I am thankful for your knowledge, for your valuable time and for your consideration.

Best Regards.

 

@Preben Alsholm 

I sincerely apologize for any inconvenience caused by my unintentional submission of a bad version of worksheet.

First of all, I'm happy for beeing at the end of the resolution of my problem. Thanks.

Then, the essential point that remains is the preservation of the positivity of U. The break  z>-4 (x<2*x0  where t=-x0^2 ) which appears in exact solution plays this role.

So, if you could help me to add it instead of events of stopping integration:

For u:  if z>-4 then  u(z)=(1+(1/4)*z)*exp((1/8)*z)    else u(z)=0       end if

For v:  if z>-4 then   v(z) = exp((1/4)*z)    else v(z)= -4*exp(-1)*1/z   end if  

Best regards.

@Preben Alsholm

I insert your code and I receive error in dsolve.

numeric_solution2.mw

@Preben Alsholm 

From your question I realize I have to review the relationship between U and u. I found that I was bit confused with the names I used in my mathematical analysis and the ones we set in numeric analysis.

The purpose of solving my problem is to find self similar solutions like

U(x,t)=(-t)^{-3/2}*u(z), V(x,t)=-t*v(z) that blow up in finite time.

Exact solution is correct (see file attached). It's clear that the behaviour of U and u doesn't show similar (U can blow up at x=0 but u not). 

When I went back to numeric_solution file, I found that I didn't pay attention to the expression of SYS.  Changing from z to x=sqrt(z*t) x>0 is actually to change from u(z) to U(x,t). So, SYS had to be

SYS:=PDEtools:-dchange({z=x^2*1/t,(-t)^{-3/2}*u(z)=U(x),-t*v(z)=V(x)},sys,[x,U,V])

The second equation of SYS becomes thus

x*t*diff(V(x),x)/2+V(x)*t+sqrt(-V(x)*t)*(-t)^{3/2}*U(x)=0

and for initial point x0=-2 ICS becomes

ICS:= {V(x0)=-exp(1/t)/t, U(x0)=(1+1/t)*exp(1/2*t)/(-t)^3/2, D(V)(x0)=exp(1/t)/t^2

or for initial point x0=0

ICS:= {V(0)=-1/t, U(0)=1/(-t)^3/2, D(V)(0)=0

D(V)(0)=0.

If my reasoning is correct why doesn't work ?

exact_solution.mw

numeric_solution2.mw

 

 

@Preben Alsholm 

I'm suffering more headaches because of this problem of initial conditions. I get the same result "singularity" near zero. Please, Let us go back to the exact solution for -4<z<0 (to avoid the break) :

sol:={u(z)=(1+z/4)*exp(z/8)/(-t)^{3/2}, v(z)=-exp(z/4)/t}, z=x^2/t

basically, initial conditions that I have from my mathematical analysis are

U(x,t0)=U0(x)=(-t0)^{3/2}*u(x^2/t0),  V(x,t0)=V0(x)=-v(x^2/t0)/t0

which is equivalent to  U0(x)=u(x^2/t0), V0(x)=v(x^2/t0)  since initial time is t0=-1. It means that I have ICS as functions of x.

I reviewed again the code "numeric_solution" and I remark that I wrote z0=-4 instead of (-x^2) and 

SYS2=subs(t=x0^2/z0,SYS) can not be correct in this case because we have U and V are functions of x as variable and t as parameter.

The fundamental question is how to write ICS since we have

{V0(x)=exp(-x^2/4), U0(x)=(1-x^2/4)*exp(-x^2/8),D(V0)(x)=-x*exp(-x^2/4)/2}.

Sorry to bother you again.

numeric_solution2.mw

 

@Preben Alsholm

When runing the code it's shows that the problem comes from V(x). The singularity of U(x) appears as division by zero  (V(x) becomes null).

In fact, the expected results whether are one peak at x=0 that arise to infinity or two peaks at right and left of zero that become one peak (Dirac) at x=0.

I think that there is something wrong at initial conditions.

Thank you for your usual support.

numeric_solution.mw

@Preben Alsholm
 

I used your recommendations to change my code. I got this error

Error, (in dsolve/numeric) 'parameters' must be specified as a list of unique unassigned names

numeric_solution.mw

@Preben Alsholm

Hi, In my worksheet of exact solution S refers to V (I forgot to get it modified).

The break x^2/t >-4 appear as a condition to conserve mass and preserve positivity of the solutions U and V.

 

@Preben Alsholm 

Hi, I struggled to find a numerical solution to my problem but in vain. I encounter the same problem of initial conditions. I do not see the mistake I committed. Kindly find the attached files (numeric code and exact solution for comparison).

Thanks for help

numeric_solution.mw

exact_solution.mw

 

@Preben Alsholm 

Happy to hear from you Preben. I gave the analytic solution for a comparison with the numerical solution solved  in sys (approximatively similar) .

Furthermore, I need your help to complete the resolution of the problem. I would like to know if it is possible

to solve sys but in this case  when switching to the variable "x" instead of  "z=x^2*t^{-1}".

The purpose is to plot the same "u" as function of "x"  instead of "z" for some values of "t" like t=-1, -0.1, -0.01.

Thanks for advance.

@Carl Love 

Thank a lot.

@Carl Love 

Sorry, curves are plotted in the same color which make ambiguous. Legend doesn't show difference between parameter "t". 

Thanks.

@Carl Love 

Thanks, that's what I'm looking for.

Once again, to insert labels for each curve as values of "t" with arrows:   t=-1 -->

Could you help how to do it.

Regard.

 

 

@tomleslie 

Sorry, see my worksheet below.

Thanks in advance.

odeplot.mw

 

@Preben Alsholm 

It's the same system. After changing some parameters according to the space dimension used, I obtain other equations like above. My problem is to avoid singularity at the initial time "t=t0=-1" and look it at "t" approaching zero. 

Thanks any way.

 

1 2 3 4 Page 3 of 4