7350 Reputation

17 Badges

10 years, 345 days

MaplePrimes Activity

These are replies submitted by tomleslie


When a solve() command returns two solutions say A, B then this should be interpreted as the solution is either A or B. When solving for an inequality, it is certainly possible that there may be some "overlap" between these two solutions, so that the relation A and B *may* be non-empty, so using plots-inequal( [A, B]) is a perfectly reasonable question. This was how your original question was phrased.

I think that in my second response I demonstrated that no such A and B solution could exist with the additional criteria M>0, m>0. It now appears that what you are interested is the solution to the problem of the simultaneous inequalities

[0 < M^2 - 4*m^2, m>0, M>0]

which (of course) can be visualised with the (simple) command

plots:-inequal( [0 < M^2 - 4*m^2, M>0, m>0], M=-10..10, m=-10..10);

which produces

BTW as an (ex-) physicist don't try to wave your qualifications around on this site, because

  1. Nobody cares
  2. In order to answer your questions, any responder here has to be smarter than you are - so insulting them is just rude

I do feel sorry for your students




Well sometimes problems of this nature can be solved by selecting an appropriate numerical integration method - see the help at ?Numerical Integration so I tried specifying a few different methods, and got precisely nowhere!

I eventually came up with an approach which provides answers for all your integrals, but uses a transformation, which I am not 100% certain is always mathematically valid. Essentially I split the integrand into a sum of terms, perform the integrations on these individual terms, and then adds the result - so essentially it requires the following to be true

I have tested this approach on a number of simple examples - and the approach *seems* to work. However testing the above expression with the Maple commands is() and coulditbe()


returns false, while


returns true

So with this caveat about the validity of the approach, consider the attached




The code below

V1 := [1.666666667, 1.983050847, 2.372881356, 2.768361582, 
    3.380681818, 3.977272727, 4.767045455, 5.755681818, 
    6.937500000, 8.244318182, 9.801136364, 0.2971428571, 
    0.6914285714, 1.085714286, 0.3942857143]:
dV1 := [0.03315280331, 0.03866282527, 0.04508264551, 
   0.05165406892, 0.06212371278, 0.07219635124, 0.08557994498, 
   0.1023815798, 0.1225076192, 0.1447933406, 0.1713677762, 
   0.01380612592, 0.01872473080, 0.02454205309, 0.01488350319]:
V2 := [17/10, 2, 12/5, 14/5, 17/5, 4, 24/5, 29/5, 7, 42/5, 10, 3/10, 7/10, 11/10, 2/5]:
dV2 := [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]:
ErrorPlot(V1, xcoords=V2, yerrors = 10*~dV1);

which produces the plot below. Note that in the plotting commadn in the above I multiplied all the errors by 10, just so they would be seriously visible. Obviously you should remove this multiplication - in which case the error bars are som small they are pretty difficult to see!


Nothing is attached


the additional execution groups at the end of the attached



There seems to be a lot of "missing" arithmetic operators in the definition of your integrand, for example the first few terms are

A__22*diff(W[i](x, y), y)(diff(W[j](x, y), y))(diff(W[k](x, y), y))

What is this meant to be? Maybe

A__22*diff(W[i](x, y), y)*(diff(W[j](x, y), y))*(diff(W[k](x, y), y))


There are multiple instance of missing operators in the integrand: since I have no idea what they are supposed to be, I can't do much with it.

The second problem that you have is that you are using 'a' as a simple scalar name, and also assigning the result of the integral to an Array with the same name  a[r,i,j,k]. This confuses the hell out of Maple, so change one of these


you could sort of try my original code with more and more conditions, so rather than

sol:=solve(0 < M^2 - 4*m^2, M) assuming (0 < M, 0 < m);
plots:-inequal([sol[1][],sol[2][]], M=-10..10, m=-10..10)

you can try

sol:=solve(0 < M^2 - 4*m^2, M) assuming (0 < M, 0 < m);
plots:-inequal([sol[1][],sol[2][], M>0], M=-10..10, m=-10..10)

and then

sol:=solve(0 < M^2 - 4*m^2, M) assuming (0 < M, 0 < m);
plots:-inequal([sol[1][],sol[2][], M>0, m>0], M=-10..10, m=-10..10)

Or is that a bit difficult for you to understand?





in the attached

any particular pde?

Why not post what you  are trying to achieve using the big green up-arrow in the Mapleprimes toolbar?

@Rouben Rostamian  

the OP's follow-up question was to ask for

the influence of U[1,6] on plot3d?

and since th functionU[1,6] conrains an angular dependence (ie radius function depend on theangle "theta"), the result cannot be a purely  "circular profile". I merely observed that the graph obtained by the OP using the (>20years-deprecated) command cylinderplot() could be exactly duplicated by using plot3d() with the 'coords=cylindrical' option


with using the command plots:-cylinderplot() other than the fact that it has been deprecated since Maple 9 (ie for about the last 20 years). Exactly the same plot can be obtained using plot3d() with the same arguments and the addition of the coords=cylindrical option.

For example the following code produces two identical plots


  U[1, 6] := (x, theta) -> 0.01503546462*(sin(-2.365000000 + 9.460000000*x) + (-1)*0.1328620030*sinh(-2.365000000 + 9.460000000*x))*cos(6*theta):

  cylinderplot( U[1, 6](x, theta) - 0.1,
                theta = 0 .. 2*Pi,
                x = 0 .. 0.5,
                grid = [50, 50],
                style = surface,
                axes = none

  plot3d( U[1, 6](x, theta) - 0.1,
          theta = 0 .. 2*Pi,
          x = 0 .. 0.5,
          coords = cylindrical,
          style = surface,
          axes = none



Code uses (long-deprecated) command vector() - using 'now-recommended' command Vector() perhaps better illustrates the OP's "issue"


L := [-2+m,3+m];

S := {-2+m,3+m};

v := Vector([-2+m,3+m]);

m := 5;

# absence of last-name evaluation

# absence of last-name evaluation

# last-name evaluation


v[1], v[2];

which produces a different output for 'v' and print(v) from that given in your code

I cannot illustrate here because this website is still broken


@Carl Love 

but the OP claims to be using this as a general technique - so when applied to a single ode with derivatives of order 1, 2, ..etc, or a system of odes with multiple order derivatives? I still think that a general approach might require multiple 'freeze()' commands

  1. You are checking the "usage" of the command Sol[n]
  2. All the command 'Sol[n]' does is to extract the n-th element of the list/vector/array/set 'Sol' - there is no "iterative scheme' involved
  3. To obtain 'usage parameters' for your 'iterative scheme' then the code for the iterative scheme has to be the first argument in the Usage() command. The simplest way to do this is to write the 'iterative scheme' as a Maple procedure

You might get more useful help if you uploaded your worksheet (using the big green up-arrow in the Mapleprimes toolbar), along with a description of which piece of code you want to 'profile'

Since 'w' is used as a loop index and hence always a numeric value, it doesn't make much sense (to me) to integrate 'L1' with respect to 'w' -

As provided the quantity 'L1' contains the unknowns a1, a2, b2, c1, c2, c3, f1, k1, k2, k3. Im guessing that these are meant to be a1[w], a2[w], b2[w], c1[w], c2[w], c3[w], f1[w], k1[w], k2[w], k3[w]}

If I make these changes, then 'L1' evaluates to a (complex) numerical constant, in fact

-0.00009976269238 + 0.04386238846*I

for loop index values d=-w and w=0.

See also my comments in the attached worksheet




1 2 3 4 5 6 7 Last Page 1 of 167