Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@ecterrab 

I take exception to the statement: "look at the solution, with the term under focus of the form _C2*erf(abs(x)) where x::real.  You know erf(-x) = -erf(x); reabsorb now that sign within _C2"

There's the rub.  You cannot absorb that sign into _C2 because the derivation of the solution presupposes that _C2 is a constant.  Now you are making it depend on x (in the form of a step function).

To see the error in that argument more clearly, let's look at another elementary example.  Unlike my first example which was an initial value problem of which you did not approve, this one is a boundary value problem, just like that in the original post.

restart;

Let's look at the boundary value problem

de := diff(y(x),x,x) + y(x) = 0;
bc := y(-Pi)=0, y(Pi)=0;

diff(diff(y(x), x), x)+y(x) = 0

 

y(-Pi) = 0, y(Pi) = 0

 

Here is the classical solution:

dsolve({de,bc});

y(x) = _C1*sin(x)

 

You seem to be saying that the function

u := x -> sin(abs(x));

proc (x) options operator, arrow; sin(abs(x)) end proc

 

is also a solution of the boundary value problem.  I am sorry, but it is not in any commonly

understood sense (classical? weak? distributional?) that I can think of.  Accepting u(x) as

a solution will overturn a good chunk of the Fourier analaysis.

 

Comment: Let's note that applying the pdetest() to u(x) gives

pdetest(y(x)=u(x), de);

signum(1, x)*cos(abs(x))-abs(1, x)^2*sin(abs(x))+sin(abs(x))

 

which is zero everywhere except at x = 0 where it is undefined.
But that does not make u(x)a solution.

 

 

 

@ecterrab 

I agree with most of what you wrote, but I disagree on the "this is not really a bug" part. A function that satisfies a differential equation everywhere except at one point, is not a solution, and a program that produces such a function is buggy and needs to be fixed.

To make this absolutely clear, let's look at this very elementary example.

restart;

Consider the differential equation:

de := diff(y(x),x,x) - y(x) = 0;

diff(diff(y(x), x), x)-y(x) = 0

along with the initial conditions:

ic := y(0)=1, D(y)(0)=1;

y(0) = 1, (D(y))(0) = 1

Here is the customary solution:

dsol := dsolve({de, ic});

y(x) = exp(x)

Let's see if this solution passes the pdetest():

pdetest({dsol, ic}, de);

0

Yes, of course it does.   Now let's introduce the function:

u := x -> piecewise(x<1, exp(x), exp(2-x));

u := proc (x) options operator, arrow; piecewise(x < 1, exp(x), exp(2-x)) end proc

Question: Is u(x) yet another solution of our initial value problem?

 

Let's check:

pdetest({y(x)=u(x), ic}, de);

piecewise(x = 1, undefined, 0)

Conclusion: We see that u(x) satisfies the differential equation except at one point.

That is enough to disqualify it from being the solution of the initial value problem.

If we admit u(x) as a legitimate solution, the whole theory of existence, uniqueness,

and well-posedness of initial value problems of differential equations goes out the window.

 

By the way, here is what u(x) looks like:

plot(u(x), x=0..3, view=0..3);

 

 

 

@torabi It is not difficult to show that zero is the only possibe answer.  Here is how.

restart;

Here are the differential equations:

de1 := (diff(r*(diff(theta(r), r)), r))/r
        + b*(diff(theta(r), r))*(diff(sigma(r), r))
        + a*(diff(theta(r), r))^2 = 0;

(diff(theta(r), r)+r*(diff(diff(theta(r), r), r)))/r+b*(diff(theta(r), r))*(diff(sigma(r), r))+a*(diff(theta(r), r))^2 = 0

de2 := b*diff(r*(diff(sigma(r), r)), r)
     + a*diff(r*(diff(theta(r), r)), r) = 0;

b*(diff(sigma(r), r)+r*(diff(diff(sigma(r), r), r)))+a*(diff(theta(r), r)+r*(diff(diff(theta(r), r), r))) = 0

bc := D(theta)(0)=0, D(sigma)(0)=0, theta(R)=0, sigma(R)=0;

(D(theta))(0) = 0, (D(sigma))(0) = 0, theta(R) = 0, sigma(R) = 0

Let us introduce:

tmp := Diff((b*diff(sigma(r), r) + a*diff(theta(r), r))*r, r) = 0;

Diff((b*(diff(sigma(r), r))+a*(diff(theta(r), r)))*r, r) = 0

We see that tmp is the same as de2:

simplify(tmp - de2);

0 = 0

OK then, tmp implies that

(b*diff(sigma(r), r) + a*diff(theta(r), r))*r = d;

(b*(diff(sigma(r), r))+a*(diff(theta(r), r)))*r = d

where d is an arbitrary constant.  Evaluating that expression at r=0, and in view of the

boundary conditions in bc, we see that d=0, therefore we have arrived at

(b*diff(sigma(r), r) + a*diff(theta(r), r)) = 0;

b*(diff(sigma(r), r))+a*(diff(theta(r), r)) = 0

and consequently

a*theta(r) + b*sigma(r) = c;

a*theta(r)+b*sigma(r) = c

for some constant c.  Solve this for sigma(r):

sigma(r) = ( c - a*theta(r) ) / b;

sigma(r) = (c-a*theta(r))/b

and substitute the result in de1:

eval(de1, sigma(r) = ( c - a*theta(r) ) / b );

(diff(theta(r), r)+r*(diff(diff(theta(r), r), r)))/r = 0

This is equivalent to

Diff(r*diff(theta(r),r), r) = 0;

Diff(r*(diff(theta(r), r)), r) = 0

therefore

r*diff(theta(r),r) = d;

r*(diff(theta(r), r)) = d

for some constant d.  Rewrite as:

diff(theta(r),r) = d/r;

diff(theta(r), r) = d/r

The boundary condition D(theta)(0)=0 cannot hold unless d=0.  But if that's the case, we get

diff(theta(r),r) = 0;

diff(theta(r), r) = 0

and therefore theta(r) is a constant.  But the boundary condition theta(R)=0 implies that

the constant is zero.  We conclude that theta is identically zero.

From the equation a*theta(r) + b*sigma(r) = c obtained earlier it follows that sigma(r) is constant.

Then from the boundary condition sigma(R)=0 we conclude that sigma is identically zero.

@sheriph05 I don't think that a search for a Lyapunov function for these equations will be fruitful.  I suggest that you focus on the analysis of local stability of equilibria through linearization, which is a more attainable goal.  You may worry about global stability afterward.

As Preben has pointed out, a general method for constructing Lyapunov functions is not known, and I seriously doubt whether such a thing is possible at all.  Nevertheless, this 2014 article appears to claim that it offers a method for doing just that.  I don't understand the mathematics in it, and so I cannot pass judgment.

Why do you want underline to those objects?  You may achieve better results through font shape (italic?), weight (bold?),  size (large?), and color (red?).

Decades ago, when people used typewriters to write on paper, they used underlining to emphasize text because there were not many other options—there was only one font.  If you look around in printed media today—newspapers, magazines, books—you will not see much underlining.  One uses a variety of fonts to get one's ideas across.

 

@ Carlos I assume that by x-value you mean y-value since you specify the last x-value yourself as 812.

To see the solution at x=812, type dsol(812).  Or dsol(x) for any numerical value of x.

@Carlos As Preben Alsholm has correctly pointed out, the option method=rkf45 does not do what you have asked.  Change the line dsol=...  to what he has suggested.

@acer As long as you are doing this, you might as well reqest the addition of a linecolor=mycolor option in the plottools package.  Right now there is no access to the default black border color of objects created by plottools, hence the awkward use of [ two plots + display ] in the examples given by me and kitonum.

 

@alfarunner I have shown my worksheet in its entirety.  For your reference, here it is as a link: mw.mw. There is no SetCoordinates() in it. It works for me in Maple 2016 and 2017.  Upload your worksheet if you are having trouble with it.

@acer Thanks for your thorough explanation, as usual. That unexpected behavior is not a big deal, and if it is done that way for the sake of efficiency, I am all for it.

 

@rlopez Hello Robert, thanks for pointing out the TNBFrame().  I didn't know about it.  It's good to know.

Happy new year!

 

g@sheriph05 You ask: 'Can disease-free equilibrium be obtained in a similar way as the endemic equilibrium point?",

I don't quite understand what that is asking, but I have several comments which may be relevant.

  • We have seen that there are two equilibria for your system of equations.  One of them has I=0, which is a good thing—if the solution go there, then the disease dies out.  In your previous messages you seemed to want to dismiss that solution.  I don't quite see why.
  • Referring to the two solutions noted above, the one with nonzero I does not necessarily indicate an acceptable solution because if I is negative, then it is not meaningful in the epidemics context.

    I suppose that your interest in Descartes's Rule of Signs stems from a desire to determine whether that I is negative or positive.

  • Having established that there is an equilibrium with a positive I value does not necessarily mean that the disease will take hold and stay forever. If the equilibrium is unstable, then its existence is pretty much irrelevant because solutions will not go toward it.

  • Similarly, if the equilibrium with I=0 is unstable, then its existence is pretty much irrelevant.  On the other hand, it it is stable, that's great news because it says that the disease eventually dies out.

In conclusion, you have two tasks ahead of you. (a) determine which equilibria are of interest, that is, identify those whose S, M, V, I values are either zero or positive, and (b) analyze the stability of those equilibria.  Only then you may be able to make interesting statements about them.

A primary method for analyzing the stability of  equilibria the Routh-Hurwitz criterion which you may be familiar with already.  If not, then Wikipedia's article on Routh-Hurwitz may be a good starting point.

 

 

@Kitonum That last line should be
plot3d(F, x=0..5, y=0..5);  # Visualization

@wswain 

Bill,

Maple's user interface is quite customizable.  It offers a Document Mode and a Worksheet Mode.  It offers a 1-D Input Mode and 2-D Input Mode.  Their combinations already yield four possible configurations.  There are many more options.

Maple's default configuration is the Document Mode and 2-D Input Mode.  I, along with many long-time Maple users, favor the configuration consisting of the 1-D Input Mode and the Worksheet Mode.  You may want to give that a try.  See https://userpages.umbc.edu/~rostamia/math481/config/maple.html for instructions.

Please note that the new configuration will not convert any of your previous documents. It will apply only to new worksheets that you make after this configuration.

Having done that, and with the help of a good guidebook to show the way, the basic operations in Maple are not too difficult to learn.  You shouldn't be groping in the dark.  I suggest Ian Thompson's Understanding Maple.  I must admit that I haven't read the book myself.  My recommendation is based (A) on having viewed a few sample pages on amazon's website; and (B) customer reviews, especially the negative ones.

That last comment may seem puzzling, so let me explain. The negative comments say that Thompson focuses on the 1-D Input Mode and the Worksheet Mode.  I say that's exactly the way it should be.  I wouldn't recommend a book that does otherwise.

I suggest that you begin reading the book from the beginning, and wend your way forward.  Should you run into difficulties, ask here and I am sure there will be many who will offer help.

 

First 65 66 67 68 69 70 71 Last Page 67 of 99