13579 Reputation

19 Badges

13 years, 105 days

MaplePrimes Activity

These are replies submitted by tomleslie


against using the big, green, up-arrow in the Mapleprimes toolbar to upload a worksheet?

See the attached

  _EnvHorizontalName := 'x':
  _EnvVerticalName := 'y':
  a := 11:
  b := 9:
  c := sqrt(a^2 - b^2):
  t1 := (3*Pi)/4:
  t2 := (-4*Pi)/5:
  ellipse(el, x^2/a^2 + y^2/b^2 - 1):
  point(M1, a*cos(t1), b*sin(t1)):
  point(M2, a*cos(t2), b*sin(t2)):
  point(F1, -c, 0):
  point(F2, c, 0):
  line(L1, [F1, M1]):
  line(L2, [F2, M2]):
  line(L3, [F1, M2]):
  line(L4, [F2, M1]):
  line( tang1, x*a*cos(t1)/a^2 + y*b*sin(t1)/b^2 = 1):
  line( tang2, x*a*cos(t2)/a^2 + y*b*sin(t2)/b^2 = 1):
  circle( c1, [T, distance(T, L4) ] ):
  display( [ textplot
             ( [ [ -c, 0, "F1"],
                 [ c,  0, "F2"] ,                         
                 [ coordinates(M1)[], "M1"],                          
                 [ coordinates(M2)[], "M2"],
                 [ coordinates(T)[], "T"]
             ( [ c1(color=blue),
                 M1(color=black, symbol=solidcircle, symbolsize=16),
                 M2(color=black, symbol=solidcircle, symbolsize=16),
                 T(color=black, symbol=solidcircle, symbolsize=16),           
                 F1(color=blue, symbol=solidcircle, symbolsize=16),                    
                 F2(color=red, symbol=solidcircle, symbolsize=16)




using the SAT solver, you might want to take a look at

where the solver is used to complete "The world's hardest Sudoku"

which you can try.

  1. Find a BVP for which the analytic solution (definitely!)  known. Compare this analytic solution, with a numeric solution of the same BVP. Any differences should be very small.
  2. Use Maple's odetest() command. Essentially this substitutes the proposed analytic solution into the original ODE, and returns 0 if the ODE is satisfied. If the ODE is not satisfied then it returns the "error" term, which is generally given by computing lhs(ODE)-rhs(ODE). Your propsed Anaytical_Solution fails this test.

Both approaches are illustrated in the attached.

I suggest you learn the difference between indexed variables and suffixed variables.

Indexed variables (eg W[2], which will display as W2) refers to the second element of an indexable container W, which willl be a list, array, vector etc - something whose entries you can identify by the index

Suffixed variables (eg W__2, which will also display as W2) refers only to a name, which happens to have an inert suffix.

In your latest worksheet, the assignment to eqs, contains all 'W' as  indexed variables (eg W[2]), but the call to indets() is only looking for variables W which are suffixed of which of course there are none

The attached contains two solutions - one where the variables you want are indexed and one where they are suffixed.

The final result in both cases is assigned to the indexable column vector W.


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

5 6 7 8 9 10 11 Last Page 7 of 206