13771 Reputation

19 Badges

14 years, 14 days

MaplePrimes Activity

These are replies submitted by tomleslie


you might have to explain tyhe problem a little more. Attached is a Word document, where I have exported you graphic from Maple as a GIF, JPEG and PNG - they all look pretty good to my aging eyes, so what don't you like?



why you think that the numerical solution of the ODE+BCs is going to agree with the entity you call the "Analytical Solution" since the two do not even depend on the same set of parameters.

In the attached I have cleared out the syntax+logical errors and evrything now executes, although (as stated above) agreement between "numerical" and "analytic" solutions is poor. Experience has taught me that Maple's numerical ODE solvers are very good and in general errors between these  solutions and an "analytical" solution (where one is known) will be very small. I therefore haveto conclude that either your analytical solution is incorrect, or the parametes you are feeding into it are incorrect.

See the attached

to generate solution curves for any value of the parameter n>1. (i'd avoid n=1, because the second term in you ODE will be zero). All you have to do is specify the correct parameter set.

The attached shows solution curves for two different parameter sets, namely

  1. x = 0, we= 0.1, n = 2, k = 0.1, 0.3, 0.5, 0.7, 0.9
  2. x = 0,  k = 0.3,  n = 2, we= 0.1, 0.3, 0.5, 0.7, 0.9


that you will be able to consistently solve this ODE for values of n<1.0. There will (almost certainly) be a singularity within the domain of the problem. (The term "singularity" in this context just refers to the fact that diff(u(y), y, y) will become infinite - if you prefer, you can think of this as a divide-by-zero error.)

See the attached for more detail

you need a (first-order) ODE. If you want some actual solution curves, then you also need some initial conditions.

The "toy" example in the attached shows what can be done with an ODE (depending on some parameters) and three initial conditions. Absolutely trivial to do. However you will not provide the ODE or the initial conditions, so no-one here can help you. If you finally provide what you have been repeatedly asked for, then generating the solution you want is so simple you wouldn't believe it. However if you continue not to provide the required information, then no solution will be possible - it is entirely up to you!

model. There appears to be a transfer from the final state (ie resolved=recovered/dead) back to the susceptible population, which is presumably modelling the fact that infection only offers partial immunity


Im using Windows 7 with Excel 2010 (14.0.7268.5000) SP2 MSO (14.0.72682.5000).

Does anything different if you exclude the 'header' line in the matrix you are trying to output?

ie replace

ExcelTools:-Export( M1, "C:/Temp/M1.xlsx", 1, "B2");


ExcelTools:-Export( M1[2..,1..2], "C:/Temp/M1.xlsx", 1, "B3");

you may as well have the attached before I transfer it to the bitbucket for good

I have no idea whether it reflects what you want, but at least it functions

Aren't posted worksheets - nice?!!

May be an Excel or OS issue, because OP's code produces the attached in Maple 2022 on my machine


which is working just fine. Only thing I had a slight doubt about was the use (in Maple) of the subscripted variable V__b. However on export and within Excel this just renders as a literal name with two underscores in it - which I owuld regard as an acceptable compromise.

Since I can't make this fail, I can't fix it. Can only suggest that the OP changes the name in the header row of the matrix to be exported from V__b, to something like Vb, just to see if it makes any difference


the option in the textplot3d() command should have read font=..., not labelfont=....  That's what too much use of copy/paste will do to you!

Fixed in the attached


The OP's original optimisation commands were

`sol1&Assign;Optimization:-Minimize`(new, t = -4.17 .. -4.10, x = 0.5 .. 0.8)
`sol2 &Assign; Optimization:-Maximize`(new, t = -4.17 .. 0, x = 0.2 .. 2)

check the ranges on 'x' - this is what I used for my original response


that was why OP restricted the range of 'x' in the optimization problems to avoid the value x=0 (and also to avoid what would appear to be infinities at x~=+/-9 and x~=+/-19


still absolutely refuse to upload an executable worksheet, I am going to follow your example, and not upload the functional worksheet I created - after all who needs this - right?

So the problems in you code are

  1. You have an global variable 'cir' which is used in the draw() command. The variable 'cir' is defined nowhere
  2. For some values of 'i' in your final seq() command, the gradient of the line L3 becomes infinite and changes sign form +ve to -ve, this causes the 'order' of the results from some of your solve() commands to change, which means that between two frames of the animation, much of the your construction is reflected about the x-axis.
  3. There are similar animation glitches when the tangent lines are either horizontal or vertical
  4. For some some values of 'i' in your final seq() command the three points supplied to the triangle command are collinear, which means that the tranngle cannot be created, Since it cannot be created you will get an error from the draw() command, because you are trying to draw something which does not exist
  1. Execute your worksheet
  2. Save the worksheet (with the output, including the error) to a .mw file
  3. On the Mapleprimes site, locate the comment to whihc yu wish to reply, and click the 'Reply' at the lower right of the comment
  4. Enter a "Title"
  5. In the toolbar here, there is a big green up-arrow, third from the right in the top row. Click this icon. This will provide a pop-up where you can select the file saved at stage 2 above
  6. Click 'Upload' in this pop-up
  7. Click 'Insert Link' in this popup
  8. A link to your worksheet will now appear in the 'Reply' which you are composing


a complete worksheet using the big green up-arrow in the Mapleprimes toolbar

First 7 8 9 10 11 12 13 Last Page 9 of 207