acer

32313 Reputation

29 Badges

19 years, 312 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

Attached is an example of accepting an indexed procname call.

2024-11-21_Q_Projective_Vector_Format_ac.mw


Now, for your type question. You seem to be under an impression that whattype gives you THE type of a thing, because you mention "...the type check", and what you have are some whattype calls.

But things can be of several types. And the type system is not even completely hierarchical. In general using whattype is (IMNSHO) a logically inferior mechanism for control flow, dynamic dispatch, etc, and I suggest that you instead check against specific types.

For example, I suggest you later do something like,

    if type(K,foo) then
    ...
    elif type(K,bar) then
     ...
     end if

instead of, say,

    W := whattype(K);
    if W=foo then
    ...
    elif W=bar then
     ...
     end if

and similar for other analogous situations.

You are of course free to do it your way. But in my experience that may eventually get into a muddle, and the fact that your examples so far don't have issues is because they are rather simple.

You asked why. It fails because an indexed reference into an rtable (Matrix,Vector,Array) cannot be evaluated unless the indexing value is an actual integer. The indexing value cannot be a name/symbol/placeholder.

So, the evaluation of Xvector[i] produces that error, for `i` just a name.

But you can make such unspecified referencing for a list (or a set), ie. you can evaluate Xlist[i]. If `i` is just a symbol then that will merely evaluate to itself.

Maple evaluates arguments to procedure calls up front (ie. before the sum routine gets its hands on them). That is Maple's normal evaluation rules for procedure calls.

So, that error occurs before sum even receives its arguments.

See also special evaluation rules.

restart;

Xlist := [1,2,3];

[1, 2, 3]


One can make an indexed reference into a list,
even for an unspecified index value.

Xlist[i];

[1, 2, 3][i]

Xvector := Vector(Xlist);

Vector(3, {(1) = 1, (2) = 2, (3) = 3})


One cannot make such an indexed reference into a Vector.

Xvector[i];

Error, bad index into Vector


That is why the following produces the same error
message. With Maple's usual evaluation rules for
procedure calls the argument Xvector[i] is evaluated
up front, before `i` gets any integer value.

The argument Xvector[i] gets evaluated prematurely.

Sometimes this (common) problem is referred to in Maple
as "premature evaluation".

sum(Xvector[i], i=1..3);

Error, bad index into Vector


By delaying the evaluation of the first argument until
the variable `i` gets actual integer values we can
avoid the problem.

We can delay the evaluation using single right-ticks a.k.a.
uneval-quotes.

sum('Xvector[i]', i=1..3);

6


The add command has special evaluation rules, which
delays evaluation of its first argument until `i` gets an
actual integer value.

add(Xvector[i], i=1..3);

6

This is simplest.

add(Xvector);

6

Download add_sum_Vector_indexing.mw

This relates to why the Help page for the sum command has, in its Basic Information Section, a Note: "Although the sum command can often be used to compute explicit sums, it is strongly recommended that the add command be used in programs if an explicit sum is needed, in particular, when summing over all elements of a list, Array, Matrix, or similar data structure."

There is even an example showing this very issue with sum and a Vector, in the sum,details Help page.

And lastly, that magenta error message in your Question here is a URL and you can just click it and have it open this page. You can even click on it from within the Maple GUI and have it open in your web browser. That web page includes the same sum & Vector problematic example, explanation, and two alternatives.

He might have used the Accents Palette from the GUI's expanded left-panel, with 2D Input, to get the arrow above a symbol.

If I do that (and also use the 2D Input syntax that allows for a function call on the left of an assignment to denote an operator definition),

restart

"(v)(v,theta):=<v*cos(rad(theta)),v*sin(rad(theta))>:"

"rad(theta):=theta/(180)*Pi:"

`#mover(mi("A"),mo("&rarr;"))` := `#mover(mi("v"),mo("&rarr;"))`(A, 35); `#mover(mi("B"),mo("&rarr;"))` := `#mover(mi("v"),mo("&rarr;"))`(B, -42)

Vector(2, {(1) = A*cos((7/36)*Pi), (2) = A*sin((7/36)*Pi)})

Vector[column](%id = 36893627931556680036)

Download accents_ex.mw

[edit] I'll add that using either the Accent palette as I did, or the short-cut keystrokes for an overscript following by the -> keys as Scot did, both produce the same blob of MathML-like TypeMK-thing which is a name which typesets in that desired manner.

Underneath, both construct the same specially formed name,
    `#mover(mi("v"),mo("&rarr;"))`

A variant is to use the Layout palette to insert a generic overscipt placeholder, and then the right arrow from the Arrows palette (or whatever other thing you might prefer there).

An aberration is seen for this example in Maple 2024 (and some other recent versions) with the plot command's default adaptive sampling algorithm.

In this case it utilizes plot's "new" adaptive=geometric algorithm for sampling x values, even if no choice for the adaptive option is supplied. Unfortunately that algorithm goes awry on this example. (I will submit a bug report against this example.)

By supplying the choice adaptive=true one can force the old default sampling, which works fine here.

plot(sin(x)*sqrt(1 - (sin(x)/x)^2), x = 0 .. Pi/4, adaptive=true)

 

Also, for fun,

plot(sin(x)*sqrt(1 - (sin(x)/x)^2), x = 0 .. Pi/4,
     adaptive=true,
     discont=[showremovable, symbol=solidcircle])

Are you trying to use a default numeric formatting? (Ie. a default number of digits shown for floats, units choices, etc?)

You might look at the Numeric Formatting Help page, possibly then through its link for a User Profile.

Another choice of representation is a 3D plot, of surfaces.

(You could play with the various transparency values, orientation, etc.)

restart;

kernelopts(version);

`Maple 2019.2, X86 64 LINUX, Nov 26 2019, Build ID 1435526`

K := 6; r := 3; c[1] := 1; c[2] := 1; s[1] := 5.5; s[2] := 2; q[1] := 1; q[2] := 1; p[1] := 2.5; phi[1] := .5; phi[2] := 1

eq1 := (D(x))(t) = r*x(t)*(1-x(t)/K)-q[1]*x(t)*E[1](t)/(x(t)+s[1])-q[2]*x(t)*E[2](t)/(x(t)+s[2])

eq2 := (D(E[1]))(t) = phi[1]*(p[1]*q[1]*E[1](t)*x(t)/(x(t)+s[1])-c[1]*E[1](t))

eq3 := (D(E[2]))(t) = phi[2]*(a*q[2]*E[2](t)*x(t)/(x(t)+s[2])-c[2]*E[2](t))

pdb := eq1, eq2, eq3

fcns := {x(t), E[1](t), E[2](t)}

Q := dsolve({pdb, x(0) = 1, E[1](0) = 3, E[2](0) = 1}, fcns, type = numeric, method = rkf45, maxfun = 500000, parameters = [a], output = listprocedure)

Lfun := eval(x(t), Q); Mfun := eval(E[1](t), Q); Nfun := eval(E[2](t), Q)

LE := proc (Evar::numeric, Tvar::numeric) Lfun(parameters = [':-a' = Evar]); Lfun(Tvar) end proc; ME := proc (Evar::numeric, Tvar::numeric) Mfun(parameters = [':-a' = Evar]); Mfun(Tvar) end proc; NE := proc (Evar::numeric, Tvar::numeric) Nfun(parameters = [':-a' = Evar]); Nfun(Tvar) end proc

plots:-display(
  plots:-textplot3d([1,1,18,"LE"],color=black),
  plots:-textplot3d([1,1,16,"ME"],color=red),
  plots:-textplot3d([1,1,14,"NE"],color=green),
  plot3d([LE,ME,NE],0..5,0..10,labels=["a","t",""],grid=[101,101],
         color=[black,red,green],plotlist,transparency=[0.3,0.5,0.6])
);

NULL

Download enfonction_p_2_cas1_ac.mw

You could also Explore that 3D plot (with a bit more transparency), where an `a` Slider manages construction of solid three colored spacecurves (changing `t`, for `a` fixed) that move across the three surfaces.
         enfonction_p_2_cas1_acc.mw

You can also make a regular animation from that:
         enfonction_p_2_cas1_ac_3danim.mw


ps. I've used Maple 2019, as did the OP.

restart;
L:=[3,4,x,x^2,x^3,sin(x)]:

map(proc(X) local la;`if`(patmatch(X,x^'n'::nonunit(anything),'la'),
                          eval('n',la),NULL);end,L);

             [2, 3]

# Or, with a small edit to your original,

map(X->[unassign('n'),`if`(patmatch(X,x^n::nonunit(anything),'la'),
                           [assign(la), n][],NULL)][],L);
Warning, (in anonymous procedure) `la` is implicitly declared local

             [2, 3]

In your approach you had put each successful result in [assign(la), n], which created those inner lists.

I don't see how one might easily get solve to show you only all the steps, ie. without getting a lot of internal procedure's details (infolevel, printlevel, the debugger, etc).

Solving for s can be done using just one of the equations, using a command from the Student:-Basics package.

nb. you might also observe the similar form of rhs and lhs of that equation, and the common position of s and j. (ie. you might solve it mentally, without even needing solve/identity etc.)

It's unclear what you're trying for h2, since it seems that you might have made a typo in the name to which you assigned the other expression. Also if you use the "correct" name then -- since the rhs=lhs for that other equation -- you're just going to get h2=h2, ie. anything works.

I use Maple 2019, in which your attachment was last saved.

restart

k1 := -y*(A-C+R-h1-h2)/(2*(-R0*y^2+g1*y^2+Cm))

-y*(A-C+R-h1-h2)/(-2*R0*y^2+2*g1*y^2+2*Cm)

k2 := (C+h2-s)/(2*y*g2)

(1/2)*(C+h2-s)/(y*g2)

`&tau;1opt` := -y*(A-C+R-h1-h2)/(2*(-R0*y^2+g1*y^2+Cm))

-y*(A-C+R-h1-h2)/(-2*R0*y^2+2*g1*y^2+2*Cm)

`&delta;opt` := (C-j+h2)/(2*y*g2)

(1/2)*(C-j+h2)/(y*g2)

These are the the same!.

k1-`&tau;1opt`

0

Why do you use tau1opt here? Did you intend `&tau;1opt` instead?

eliminate({k1 = tau1opt, k2 = `&delta;opt`}, {s})

tau1opt

-y*(A-C+R-h1-h2)/(-2*R0*y^2+2*g1*y^2+2*Cm)

[{s = j}, {-2*R0*tau1opt*y^2+2*g1*tau1opt*y^2+A*y-C*y+2*Cm*tau1opt+R*y-h1*y-h2*y}]

k2 = `&delta;opt`

(1/2)*(C+h2-s)/(y*g2) = (1/2)*(C-j+h2)/(y*g2)

Student:-Basics:-LinearSolveSteps(k2 = `&delta;opt`, s)

_m139739756118016

Download Q_3_ac.mw

The muddy part of the (otherwise red) ball is due to having an semi-transparent greenish-yellow portion of surface between it and the viewer, no? Is that ameliorated enough by making the surface more transparent, or altering the color/shading choice?

The jagged shadows seem to be artefacts visualizing a farther portion of surface through the transparent closer portion, combined with how the GUI's surface renderer deals with the (discrete data) plotting structure.
1) The jagged shadowing might be lessened by decreasing the cylindrical data granularity (ie. increasing the grid resolution, at least for cylindrical theta), eg. using grid=[351,51] or such for the sphereplot. After doing so there still some oddness with dropped color from the front portion at some angles, but at least it's not jagged.
2) You might be more satisfied with a single color for the sphereplot.

ps. plottools:-transform and plottools:-rotate lose several parts of axis information. Some such aspects are not always sensibly translatable, but it's heavy handed in dropping it all. I've gotten in the habit of putting that kind of "global" stuff in any final plots:-display, instead of having it "local" to any one particular feature that I'm combining with others. Not ideal, but I often do it now from habit.

What you've shown is a consequence of applying a list of equations to an argument. Each side of each equation is applied to the argument. Note also what happens when you apply a single equation to an argument.

eq := f=g;

f = g

eq(1);

f(1) = g(1)

L := [(x->x+2)=b, a(t)=sin];

[(proc (x) options operator, arrow; x+2 end proc) = b, a(t) = sin]

L(1);

[3 = b(1), (a(t))(1) = sin(1)]

 

In short, it's doing what's been asked of it.

Note also that a(t) is a mere function call, and not a procedure or operator; It's instance of t has nothing to do with the 1 used as an argument.

When you use output=listprocedure then only the rhs's of the equations in the returned list are procedures/operators. The lhs's are just unevaluated function calls. Applying those unevaluated function calls to some argument doesn't do anything special; each makes an unevaluated function call of an unevaluated function call. If you apply H(q) to argument p then (with H unassigned) all you get back is H(q)(p) .

If you don't want to deal with that then don't use output=listprocedure. There are other choices of output form.

Alternatively, you could in fact accomodate that behaviour. You could apply only the rhs of some of the equations, etc.

Or, you could pick off the resulting applied rhs's using a variant like,
   foo := dsol(1);
   eval(x(t)(1), foo);

etc. Here is just one way to do that in your sheet. There are other variants, naturally. (ie. your claim about a substitution not being possible is not true; it just needs doing differently),
dsolve_numeric_output_with_extra_brackets_ac.mw

nb. It wouldn't make sense if the various output choices for dsolve,numeric all acted just the same. You might use which one suits your followup tasks best for you.

edit: Readers of this Question thread might also be interested in this related, earlier Question.

In addition to the mentioned listprocedure (and the default procedurelist), there is also the choice of output=operator. So for this example, subsequent substitutions into an existing expression eq0 (in terms of x(t),y(t),etc) might also be done as,

dsol := dsolve({daes, ics}, numeric, output = operator):
# and then,
eval[recurse](eq0, [t=1,dsol(1)[]]);
# or,
eval(eval(eq0,t=1),dsol(1));

dsolve_numeric_output_with_extra_brackets_ac2.mw

The various choices (listprocedure,procedurelist,operator) for dsolve's output option can all be made to work here, often each in several ways. But depending on the particular use-case some choices might be more straightforward to utilize. And some may be more efficient; again it depends on the example goal. No size best fits all.

You might be able to utilize the size option to get a specific number of pixels.

That option is accepted by, say, the plot and plots:-display commands (and others). Eg,
   plot(..., size=[504,208])

You can also set it just once at the start of a worksheet, as a kind of default for the session. Eg, for 2D plots, eg.
   plots:-setoptions(size=[672,384]):

The conversion of that to inches will depend on the resolution of your device (which I cannot know). Your monitor might be at 72 ppi or 96 ppi (pixels per inch), etc. Or you may have hi-res. Or you may be exporting/printing the worksheet at 300 ppi, etc. Whichever it is, you might do the arithmetic to get the pixel values needed.

ps. I'm not sure whether you are trying to export/print the worksheet as a whole (to paper or to PDF file, say), or exporting plots individually to file using plotsetup, etc.

In the worksheet attached below, those coefficients are stored in a Matrix.

The main point here is that the coefficients you wanted have been extracted and stored separately, so that you can re-use them programmatically (and separately).

If you wanted you could form equations with all the entries of the Matrix equated to zero, or do so with the numerators, etc. Use the entries of M the Matrix as you wish.

The extraction happens in the short double-loop in red 1D code. The remaining portion of the worksheet merely demonstrates that the coefficients are as desired, and also provides a visual.

restart

ode := b[5]*V(xi)^4/b[6]+b[3]*V(xi)^3/b[6]+b[4]*V(xi)^3/b[6]+b[2]*V(xi)^2/b[6]+V(xi)*(diff(diff(V(xi), xi), xi))*a*l/(2*m*b[6])+2*V(xi)*(diff(diff(V(xi), xi), xi))*a/b[6]+(diff(V(xi), xi))^2*a*l^2/(4*m^2*b[6])+3*(diff(V(xi), xi))^2*a*l/(2*m*b[6])+2*(diff(V(xi), xi))^2*a/b[6]+b[1]*V(xi)/b[6]+diff(diff(V(xi), xi), xi)-l*lambda/b[6] = 0

S := alpha[0]+alpha[1]*(diff(G(xi), xi))/G(xi)+beta[0]/G(xi)

WW := diff(G(xi), `$`(xi, 2)) = -lambda*G(xi)+mu

NULL

D1 := diff(S, xi)

D11 := subs(WW, D1)

D2 := diff(D11, xi)

D22 := subs(WW, D2)

K := V(xi) = S

K1 := diff(V(xi), xi) = D11

K2 := diff(diff(V(xi), xi), xi) = D22

P := eval(ode, {K, K1, K2})

PQ := expand(collect(P, {1/G(xi), diff(G(xi), xi)}))

QW := ((diff(G(xi), xi))/G(xi))^2 = (lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)/G(xi)^2+2*mu/G(xi)-lambda

QW1 := ((diff(G(xi), xi))/G(xi))^3 = ((lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)/G(xi)^2+2*mu/G(xi)-lambda)*(diff(G(xi), xi))/G(xi)

QW2 := ((diff(G(xi), xi))/G(xi))^4 = ((lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)/G(xi)^2+2*mu/G(xi)-lambda)^2

QW3 := ((diff(G(xi), xi))/G(xi))^5 = ((lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)/G(xi)^2+2*mu/G(xi)-lambda)^2*(diff(G(xi), xi))/G(xi)

E := eval(PQ, isolate(QW, (diff(G(xi), xi))^2))

E1 := eval(E, isolate(QW1, (diff(G(xi), xi))^3))

E2 := eval(E1, isolate(QW2, (diff(G(xi), xi))^4))

E3 := eval(E2, isolate(QW3, (diff(G(xi), xi))^5))

TT := expand(simplify((lhs-rhs)(E3), {(diff(G(xi), xi))/G(xi) = FOO}))

(mm,nn) := 1+degree(denom(TT),G(xi)),1+degree(TT,FOO):


The coefficients are stored in Matrix M

MM := Matrix(mm,nn):
for jj from 1 to nn do
  this := expand(coeff(TT,FOO,jj-1));
  for ii from 1 to mm do
    MM[ii,jj] := simplify(coeff(this, G(xi), -ii+1));
  end do;
end do:


Check against TT, by adding up the terms

resFOO := add(add(G(xi)^(-ii+1)*FOO^(jj-1)*MM[ii,jj],jj=1..nn),ii=1..mm):


It's equal to the TT

simplify(resFOO-TT);

0


Check against (lhs-rhs)(E3), by adding up the terms

res := add(add(G(xi)^(-ii+1)*(diff(G(xi),xi)/G(xi))^(jj-1)*MM[ii,jj],jj=1..nn),ii=1..mm):


It's equal to (lhs-rhs)(E3)

simplify(expand(res-(lhs - rhs)(E3)));

0


For visual effect only:

seq(seq(print(G(xi)%^(-ii+1)
              %* Typesetting:-mfenced(Typesetting:-Typeset(diff(G(xi),xi)/G(xi)))%^(jj-1)
              %* MM[ii,jj]),
        jj=1..nn),ii=1..mm);

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), 0), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 0)), (alpha[0]^4*b[5]+(b[3]+b[4])*alpha[0]^3+(-6*lambda*alpha[1]^2*b[5]+b[2])*alpha[0]^2+(-3*alpha[1]^2*(b[3]+b[4])*lambda+b[1])*alpha[0]-lambda*(-lambda*alpha[1]^4*b[5]+alpha[1]^2*b[2]+l))/b[6])

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), 0), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 1)), -(-4*b[5]*alpha[0]^3+(-3*b[3]-3*b[4])*alpha[0]^2+(4*lambda*alpha[1]^2*b[5]-2*b[2])*alpha[0]+alpha[1]^2*(b[3]+b[4])*lambda-b[1])*alpha[1]/b[6])

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -1), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 0)), (1/2)*(((-24*(b[5]*alpha[0]+(1/4)*b[3]+(1/4)*b[4])*lambda*alpha[1]^2+8*b[5]*alpha[0]^3+(6*b[3]+6*b[4])*alpha[0]^2+(-4*a*lambda+4*b[2])*alpha[0]-2*b[6]*lambda+2*b[1])*beta[0]-4*alpha[1]^2*mu*(2*lambda*alpha[1]^2*b[5]-6*b[5]*alpha[0]^2+(-3*b[3]-3*b[4])*alpha[0]+a*lambda-b[2]))*m-a*l*lambda*(mu*alpha[1]^2+alpha[0]*beta[0]))/(m*b[6]))

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -1), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 1)), -(1/2)*(((-24*b[5]*alpha[0]^2+(-12*b[3]-12*b[4])*alpha[0]+8*lambda*alpha[1]^2*b[5]+4*a*lambda-4*b[2])*beta[0]-4*mu*((4*alpha[1]^2*b[5]+a)*alpha[0]+(b[3]+b[4])*alpha[1]^2+(1/2)*b[6]))*m+a*l*(lambda*beta[0]-mu*alpha[0]))*alpha[1]/(m*b[6]))

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -2), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 0)), (1/4)*(4*(-4*((1/2)*alpha[1]^2*b[5]+a)*(B[1]+B[2])*(B[1]-B[2])*alpha[1]^2*lambda^3+((6*(B[1]^2-B[2]^2)*b[5]*alpha[0]^2+3*(B[1]-B[2])*(B[1]+B[2])*(b[3]+b[4])*alpha[0]-6*b[5]*beta[0]^2+B[1]^2*b[2]-B[2]^2*b[2])*alpha[1]^2-4*a*beta[0]^2)*lambda^2+2*(3*b[5]*alpha[1]^4*mu^2+5*mu*((12/5)*alpha[0]*b[5]*beta[0]+(3/5)*(b[3]+b[4])*beta[0]+a*mu)*alpha[1]^2+3*(alpha[0]^2*b[5]*beta[0]+((1/2)*(b[3]+b[4])*beta[0]+a*mu)*alpha[0]+(1/2)*mu*b[6]+(1/6)*b[2]*beta[0])*beta[0])*lambda-3*mu^2*(2*b[5]*alpha[0]^2+(b[3]+b[4])*alpha[0]+(1/3)*b[2])*alpha[1]^2)*m^2-8*((1/2)*alpha[1]^2*(B[1]^2-B[2]^2)*lambda^2+beta[0]^2*lambda-(7/4)*alpha[1]^2*mu^2-(3/4)*beta[0]*alpha[0]*mu)*a*lambda*l*m-a*l^2*lambda*(-mu^2*alpha[1]^2+lambda*beta[0]^2))/(b[6]*lambda*m^2))

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -2), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 1)), (1/2)*alpha[1]*(8*((B[1]+B[2])*((b[5]*alpha[0]+(1/4)*b[3]+(1/4)*b[4])*alpha[1]^2+a*alpha[0]+(1/2)*b[6])*(B[1]-B[2])*lambda^2+3*beta[0]*((2/3)*b[5]*alpha[1]^2*mu+alpha[0]*b[5]*beta[0]+a*mu+(1/4)*(b[3]+b[4])*beta[0])*lambda-mu^2*((b[5]*alpha[0]+(1/4)*b[3]+(1/4)*b[4])*alpha[1]^2+a*alpha[0]+(1/2)*b[6]))*m^2+10*a*l*((1/5)*alpha[0]*(B[1]^2-B[2]^2)*lambda^2+mu*beta[0]*lambda-(1/5)*alpha[0]*mu^2)*m+a*l^2*mu*beta[0]*lambda)/(b[6]*lambda*m^2))

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -3), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 0)), (1/2)*((8*(B[1]+B[2])*(((3*b[5]*alpha[0]+(3/4)*b[3]+(3/4)*b[4])*alpha[1]^2+a*alpha[0]+(1/2)*b[6])*beta[0]+(7/2)*alpha[1]^2*mu*((2/7)*alpha[1]^2*b[5]+a))*(B[1]-B[2])*lambda^2+20*beta[0]^2*(((2/5)*b[5]*alpha[0]+(1/10)*b[3]+(1/10)*b[4])*beta[0]+mu*((6/5)*alpha[1]^2*b[5]+a))*lambda-8*mu^2*(((3*b[5]*alpha[0]+(3/4)*b[3]+(3/4)*b[4])*alpha[1]^2+a*alpha[0]+(1/2)*b[6])*beta[0]+(7/2)*alpha[1]^2*mu*((2/7)*alpha[1]^2*b[5]+a)))*m^2+9*a*((2/9)*((11/2)*mu*alpha[1]^2+alpha[0]*beta[0])*(B[1]+B[2])*(B[1]-B[2])*lambda^2+lambda*mu*beta[0]^2-(11/9)*mu^3*alpha[1]^2-(2/9)*beta[0]*alpha[0]*mu^2)*l*m+mu*a*l^2*(alpha[1]^2*(B[1]^2-B[2]^2)*lambda^2+beta[0]^2*lambda-alpha[1]^2*mu^2))/(b[6]*lambda*m^2))

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -3), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 1)), -(1/2)*alpha[1]*((-24*((1/3)*alpha[1]^2*b[5]+a)*(B[1]+B[2])*(B[1]-B[2])*lambda^2-8*beta[0]^2*lambda*b[5]+24*mu^2*((1/3)*alpha[1]^2*b[5]+a))*m^2+10*((-B[1]^2+B[2]^2)*lambda^2+mu^2)*a*l*m+((-B[1]^2+B[2]^2)*lambda^2+mu^2)*a*l^2)*beta[0]/(b[6]*lambda*m^2))

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -4), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 0)), (1/4)*((4*(alpha[1]^2*b[5]+6*a)*m^2+10*a*l*m+a*l^2)*(B[1]+B[2])^2*(B[1]-B[2])^2*alpha[1]^2*lambda^4+(24*(alpha[1]^2*b[5]+a)*m^2+10*a*l*m+a*l^2)*(B[1]+B[2])*(B[1]-B[2])*beta[0]^2*lambda^3+2*(2*(-2*b[5]*mu^2*(B[1]-B[2])*(B[1]+B[2])*alpha[1]^4-12*a*mu^2*(B[1]-B[2])*(B[1]+B[2])*alpha[1]^2+b[5]*beta[0]^4)*m^2-10*a*alpha[1]^2*l*mu^2*(B[1]-B[2])*(B[1]+B[2])*m-a*alpha[1]^2*l^2*mu^2*(B[1]-B[2])*(B[1]+B[2]))*lambda^2-mu^2*(24*(alpha[1]^2*b[5]+a)*m^2+10*a*l*m+a*l^2)*beta[0]^2*lambda+mu^4*(4*(alpha[1]^2*b[5]+6*a)*m^2+10*a*l*m+a*l^2)*alpha[1]^2)/(lambda^2*m^2*b[6]))

Parse:-ConvertTo1D, "invalid input %1", `%*`(`%*`(`%^`(G(xi), -4), `%^`(Typesetting:-mfenced(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("&DifferentialD;"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;"), Typesetting:-mi("&xi;"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;")))), Typesetting:-mrow(Typesetting:-mi("G"), Typesetting:-mo("&ApplyFunction;"), Typesetting:-mfenced(Typesetting:-mi("&xi;"))))), 1)), 0)

Download collect_sb_ac.mw

Your calls like,

   evalf(sum(f(h*i+a)*h, i = 1 .. n))

are prematurely calling the passed f procedure before index variable i gets any actual integer value. In other words, it is evaluating f(h*i+a) with i being just a symbolic name.

Instead, try those like,

   evalf(add(f(h*i+a)*h, i = 1 .. n))

The add command has special evaluation rules, which here can prevent the call f(h*i+a) from being evaluated until the index i gets actual integer values from the 1..n range.

forum_ac.mw

You might also need to examine your algorithms for correctness; I haven't.

See also the third note on the Basic Information section of the Help page for sum.

Another choice is,

   plot(t->eval(r,dsol1(t)), 0..10)

which seems pretty natural to me. As you can see the operator can be more directly constructed, more tersely and without the longer and more complicated use of unapply and uneval-quotes.

Using eval (or subs) for the substitution is pretty natural Maple here, as you have given an r formula up front, and want to substitute into it.

You may wish to compare approaches, for efficiency. Your followup approach with double uneval-quotes is slower.

In the attached worksheet I also try to force a similar number of points for all approaches, for sake of comparison.

computation_with_dsolve_exports_ac.mw

Some other approaches in which the x(t) and y(t) instance are computed separately (for each numeric t value) may also be slower than pumping each numeric t value just once into the returned dsolve thing and then extracting -- though that might also depend on how they get utilize. I won't bother to give such. Note that odeplot is optimized to utilize the computed components efficiently in this respect.

ps. I won't mention the output=listprocedure (or operator) choices since you might find those too complicated for your liking.

[update] I see that Kitonum has since added another answer. You'll see that his suggestion,
   r:=s->eval(sqrt(x(t)^2+y(t)^2), dsol1(s)):
   plot(r, 0..3);

is functionally nearly identical to mine. (I used the assignment you already had to `r`.)
   r:=sqrt(x(t)^2+y(t)^2);
   plot(t->eval(r,dsol1(t)), 0..10);

Given your own r formula up front,
   r:=sqrt(x(t)^2+y(t)^2);
then you can of course assign the operator to a name, and then re-use it in plotting, rootfinding, optimizing, etc.
   fr := t->eval(r,dsol1(t));
   plot(fr, 0..10);
...
and so on.

Note also that with the syntax I gave you can reassign name `r` with another new formula in x(t),y(t) and that same operator can then be re-utilized and access the updated formula. (Kitonum's answer hard-coded your original formula in the operator; though it's just a step to recreate a new operator.) 

Is this something like what you're trying to accomplish, checking whether any of the solutions can be verified by odetest, for each set of parameters?

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

NULL

Fode := (-delta*eta^2+alpha*eta)*(diff(diff(U(xi), xi), xi))-U(xi)*(2*eta*gamma*theta*(delta*eta-alpha)*U(xi)^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0

(-delta*eta^2+alpha*eta)*(diff(diff(U(xi), xi), xi))-U(xi)*(2*gamma*eta*theta*(delta*eta-alpha)*U(xi)^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0

NULL

F := sum(a[i]*G(xi)^i, i = 0 .. 1)

a[0]+a[1]*G(xi)

D1 := diff(F, xi)

a[1]*(diff(G(xi), xi))

NULL

S := (diff(G(xi), xi))^2 = G(xi)^4+A[2]*G(xi)^2+A[1]

(diff(G(xi), xi))^2 = G(xi)^4+A[2]*G(xi)^2+A[1]

S1 := diff(G(xi), xi) = sqrt(G(xi)^4+A[2]*G(xi)^2+A[1])

diff(G(xi), xi) = (G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

E1 := eval(D1, S1)

a[1]*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

D2 := diff(E1, xi)

(1/2)*a[1]*(4*G(xi)^3*(diff(G(xi), xi))+2*A[2]*G(xi)*(diff(G(xi), xi)))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

E2 := eval(D2, S1)

(1/2)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

K := U(xi) = F

U(xi) = a[0]+a[1]*G(xi)

K1 := diff(U(xi), xi) = E1

diff(U(xi), xi) = a[1]*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

K2 := diff(U(xi), xi, xi) = E2

diff(diff(U(xi), xi), xi) = (1/2)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

L := eval(Fode, {K, K1, K2})

(1/2)*(-delta*eta^2+alpha*eta)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)-(a[0]+a[1]*G(xi))*(2*gamma*eta*theta*(delta*eta-alpha)*(a[0]+a[1]*G(xi))^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0

L1 := normal((1/2)*(-delta*eta^2+alpha*eta)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)-(a[0]+a[1]*G(xi))*(2*gamma*eta*theta*(delta*eta-alpha)*(a[0]+a[1]*G(xi))^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0)

-2*G(xi)^3*gamma*delta*eta^2*theta*a[1]^3+2*G(xi)^3*gamma*alpha*eta*theta*a[1]^3-6*G(xi)^2*gamma*delta*eta^2*theta*a[0]*a[1]^2+6*G(xi)^2*gamma*alpha*eta*theta*a[0]*a[1]^2-6*G(xi)*gamma*delta*eta^2*theta*a[0]^2*a[1]+6*G(xi)*gamma*alpha*eta*theta*a[0]^2*a[1]-2*gamma*delta*eta^2*theta*a[0]^3-2*G(xi)^3*delta*eta^2*a[1]-G(xi)*delta*eta^2*k^2*a[1]+2*gamma*alpha*eta*theta*a[0]^3+2*G(xi)^3*alpha*eta*a[1]+G(xi)*alpha*eta*k^2*a[1]-G(xi)*delta*eta^2*A[2]*a[1]-delta*eta^2*k^2*a[0]+G(xi)*alpha*eta*A[2]*a[1]+2*G(xi)*delta*eta*k*a[1]+alpha*eta*k^2*a[0]-2*G(xi)*alpha*k*a[1]+2*delta*eta*k*a[0]-G(xi)*delta*a[1]-2*alpha*k*a[0]-delta*a[0] = 0

collect(L1, {G(xi)})

(-2*delta*eta^2*gamma*theta*a[1]^3+2*alpha*eta*gamma*theta*a[1]^3-2*delta*eta^2*a[1]+2*alpha*eta*a[1])*G(xi)^3+(-6*delta*eta^2*gamma*theta*a[0]*a[1]^2+6*alpha*eta*gamma*theta*a[0]*a[1]^2)*G(xi)^2+(-6*delta*eta^2*gamma*theta*a[0]^2*a[1]+6*alpha*eta*gamma*theta*a[0]^2*a[1]-delta*eta^2*k^2*a[1]+alpha*eta*k^2*a[1]-delta*eta^2*A[2]*a[1]+alpha*eta*A[2]*a[1]+2*delta*eta*k*a[1]-2*alpha*k*a[1]-delta*a[1])*G(xi)-2*gamma*delta*eta^2*theta*a[0]^3+2*gamma*alpha*eta*theta*a[0]^3-delta*eta^2*k^2*a[0]+alpha*eta*k^2*a[0]+2*delta*eta*k*a[0]-2*alpha*k*a[0]-delta*a[0] = 0

eq0 := -2*delta*eta^2*gamma*theta*a[0]^3+2*alpha*eta*gamma*theta*a[0]^3-delta*eta^2*k^2*a[0]+alpha*eta*k^2*a[0]+2*delta*eta*k*a[0]-2*alpha*k*a[0]-delta*a[0] = 0

eq1 := -6*delta*eta^2*gamma*theta*a[0]^2*a[1]+6*alpha*eta*gamma*theta*a[0]^2*a[1]-delta*eta^2*k^2*a[1]+alpha*eta*k^2*a[1]-delta*eta^2*A[2]*a[1]+alpha*eta*A[2]*a[1]+2*delta*eta*k*a[1]-2*alpha*k*a[1]-delta*a[1] = 0

eq2 := -6*delta*eta^2*gamma*theta*a[0]*a[1]^2+6*alpha*eta*gamma*theta*a[0]*a[1]^2 = 0

eq3 := -2*delta*eta^2*gamma*theta*a[1]^3+2*alpha*eta*gamma*theta*a[1]^3-2*delta*eta^2*a[1]+2*alpha*eta*a[1] = 0

COEFFS := solve({eq0, eq1, eq2, eq3}, {alpha, eta, a[0], a[1]}, explicit)

{alpha = -(1/2)*delta/k, eta = 0, a[0] = a[0], a[1] = a[1]}, {alpha = alpha, eta = eta, a[0] = 0, a[1] = 0}, {alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), eta = eta, a[0] = 0, a[1] = -1/(-gamma*theta)^(1/2)}, {alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), eta = eta, a[0] = 0, a[1] = 1/(-gamma*theta)^(1/2)}, {alpha = delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k), eta = eta, a[0] = a[0], a[1] = 0}

COEFFS := map[2](remove, evalb, [COEFFS])

[{alpha = -(1/2)*delta/k, eta = 0}, {a[0] = 0, a[1] = 0}, {alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = -1/(-gamma*theta)^(1/2)}, {alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = 1/(-gamma*theta)^(1/2)}, {alpha = delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k), a[1] = 0}]

verifiedsols := table([seq(COEFFS[i]={},i=1..nops(COEFFS))]):
for thisCF in COEFFS do
  thisFode := simplify(eval(Fode, thisCF));
  if thisFode = (0=0) then
    verifiedsols[thisCF] := {U(xi)=U(xi)};
  else
    S2 := dsolve(S, G(xi));
    for thisS2 in S2 do
      thisCFS2 := simplify(eval(eval(K, thisCF), thisS2));
      if odetest(thisCFS2, thisFode)=0 then
        verifiedsols[thisCF] := verifiedsols[thisCF] union {thisCFS2};
      end if;
    end do;
  end if;
end do:

map(u->print(u=verifiedsols[u]), [indices(verifiedsols,'nolist')]):

{a[0] = 0, a[1] = 0} = {U(xi) = 0}

{alpha = delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k), a[1] = 0} = {U(xi) = a[0]}

{alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = -1/(-gamma*theta)^(1/2)} = {U(xi) = -JacobiSN((1/2)*(2*(A[2]^2-4*A[1])^(1/2)-2*A[2])^(1/2)*xi+c__1, 2^(1/2)*(-A[1]*A[2]*(A[2]^2-4*A[1])^(1/2)+A[1]*A[2]^2-2*A[1]^2)^(1/2)/(A[2]*(A[2]^2-4*A[1])^(1/2)-A[2]^2+2*A[1]))*A[1]*2^(1/2)/(gamma^(1/2)*(-theta)^(1/2)*(A[1]*(-A[2]+(A[2]^2-4*A[1])^(1/2)))^(1/2))}

{alpha = -(1/2)*delta/k, eta = 0} = {U(xi) = U(xi)}

{alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = 1/(-gamma*theta)^(1/2)} = {U(xi) = JacobiSN((1/2)*(2*(A[2]^2-4*A[1])^(1/2)-2*A[2])^(1/2)*xi+c__1, 2^(1/2)*(-A[1]*A[2]*(A[2]^2-4*A[1])^(1/2)+A[1]*A[2]^2-2*A[1]^2)^(1/2)/(A[2]*(A[2]^2-4*A[1])^(1/2)-A[2]^2+2*A[1]))*A[1]*2^(1/2)/(gamma^(1/2)*(-theta)^(1/2)*(A[1]*(-A[2]+(A[2]^2-4*A[1])^(1/2)))^(1/2))}

GG := [indices(verifiedsols,'nolist')];

[{a[0] = 0, a[1] = 0}, {alpha = delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k), a[1] = 0}, {alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = -1/(-gamma*theta)^(1/2)}, {alpha = -(1/2)*delta/k, eta = 0}, {alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = 1/(-gamma*theta)^(1/2)}]

GG[1], verifiedsols[GG[1]];
eval(Fode,GG[1]);
if % <> (0=0) then
  odetest(verifiedsols[GG[1]], eval(Fode,GG[1]));
end if;

{a[0] = 0, a[1] = 0}, {U(xi) = 0}

(-delta*eta^2+alpha*eta)*(diff(diff(U(xi), xi), xi))-U(xi)*(2*gamma*eta*theta*(delta*eta-alpha)*U(xi)^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0

0

GG[2], verifiedsols[GG[2]];
eval(Fode,GG[2]);
if % <> (0=0) then
  odetest(verifiedsols[GG[2]], eval(Fode,GG[2]));
end if;

{alpha = delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k), a[1] = 0}, {U(xi) = a[0]}

(-eta^2*delta+delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)*eta/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k))*(diff(diff(U(xi), xi), xi))-U(xi)*(2*gamma*eta*theta*(delta*eta-delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k))*U(xi)^2+eta^2*delta*k^2+(-k^2*delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k)-2*k*delta)*eta+2*k*delta*(2*eta^2*gamma*theta*a[0]^2+eta^2*k^2-2*eta*k+1)/(2*eta*gamma*theta*a[0]^2+eta*k^2-2*k)+delta) = 0

0

GG[3], verifiedsols[GG[3]];
eval(Fode,GG[3]);
if % <> (0=0) then
  odetest(verifiedsols[GG[3]], eval(Fode,GG[3]));
end if;

{alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = -1/(-gamma*theta)^(1/2)}, {U(xi) = -JacobiSN((1/2)*(2*(A[2]^2-4*A[1])^(1/2)-2*A[2])^(1/2)*xi+c__1, 2^(1/2)*(-A[1]*A[2]*(A[2]^2-4*A[1])^(1/2)+A[1]*A[2]^2-2*A[1]^2)^(1/2)/(A[2]*(A[2]^2-4*A[1])^(1/2)-A[2]^2+2*A[1]))*A[1]*2^(1/2)/(gamma^(1/2)*(-theta)^(1/2)*(A[1]*(-A[2]+(A[2]^2-4*A[1])^(1/2)))^(1/2))}

(-eta^2*delta+delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)*eta/(eta*k^2+eta*A[2]-2*k))*(diff(diff(U(xi), xi), xi))-U(xi)*(2*gamma*eta*theta*(delta*eta-delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k))*U(xi)^2+eta^2*delta*k^2+(-k^2*delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k)-2*k*delta)*eta+2*k*delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k)+delta) = 0

0

GG[4], verifiedsols[GG[4]];
eval(Fode,GG[4]);
if % <> (0=0) then
  odetest(verifiedsols[GG[4]], eval(Fode,GG[4]));
end if;

{alpha = -(1/2)*delta/k, eta = 0}, {U(xi) = U(xi)}

0 = 0

GG[5], verifiedsols[GG[5]];
eval(Fode,GG[5]);
if % <> (0=0) then
  odetest(verifiedsols[GG[5]], eval(Fode,GG[5]));
end if;

{alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), a[0] = 0, a[1] = 1/(-gamma*theta)^(1/2)}, {U(xi) = JacobiSN((1/2)*(2*(A[2]^2-4*A[1])^(1/2)-2*A[2])^(1/2)*xi+c__1, 2^(1/2)*(-A[1]*A[2]*(A[2]^2-4*A[1])^(1/2)+A[1]*A[2]^2-2*A[1]^2)^(1/2)/(A[2]*(A[2]^2-4*A[1])^(1/2)-A[2]^2+2*A[1]))*A[1]*2^(1/2)/(gamma^(1/2)*(-theta)^(1/2)*(A[1]*(-A[2]+(A[2]^2-4*A[1])^(1/2)))^(1/2))}

(-eta^2*delta+delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)*eta/(eta*k^2+eta*A[2]-2*k))*(diff(diff(U(xi), xi), xi))-U(xi)*(2*gamma*eta*theta*(delta*eta-delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k))*U(xi)^2+eta^2*delta*k^2+(-k^2*delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k)-2*k*delta)*eta+2*k*delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k)+delta) = 0

0

 

 

Download odetest_ac.mw

First 12 13 14 15 16 17 18 Last Page 14 of 336