Carl Love

Carl Love

26361 Reputation

25 Badges

11 years, 135 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

@mmcdara You asked:

  • A question for more skilled Maple users: Is it true that dsolve/numeric is not capable to handle a Fourier boundary condition for a first order ode?

I don't know what "Fourier boundary condition" means, but I do understand what is happening here, and it's almost always easy to correct. It's not specific to first-order ODEs.

The issue is that dsolve(..., numeric) won't accept boundary conditions that use a derivative of the same order or higher order than the highest order of derivative of the corresponding function occuring in the ODEs.

Your example is

{diff(Phi(Y), Y)+f-Phi(Y) = 0, Phi(1)=1.5*D(Phi)(1)}

The boundary condition uses the first derivative of Phi, which is the highest-order derivative of Phi used in the ODE. Algebraically solving the ODE for that derivative yields diff(Phi(Y), Y) = Phi(Y) - f. So, in the BC, replace D(Phi)(1) with eval(Phi(Y) - f, Y= 1). The same thing can easily be done with the OP's system.

 

Here's a procedure for it:

RelErr:= proc(f::algebraic, V::list(name= `&+-`(realcons, realcons)))
local x;
    eval(add(abs(diff(f,lhs(x))*op(2, rhs(x))), x= V)/abs(f), lhs~(V)=~ op~(1, rhs~(V)))
end proc
:  
RelErr(R*i^2*t, [R= 1.5 &+- 0.5, i= 2.5 &+- 0.05, t= 10 &+- 0.5]);
                          0.4233333333

RelErr(G*M*m/r^2, [M= 7 &+- 0.05, m= 2 &+- 0.02, r= 5 &+- 0.05]);
                         0.03714285714

 

Use fsolve, not solve. Nothing else needs to be changed. The problem is that solve is trying to find all complex solutions.

Here is a much-more efficient version of my procedure IsoCovers.

First, taking the information from the PDF file that you attached to this thread, I'll define an isomorphism cover of a graph H. Let n be the number of vertices. By non-vertex-labelled form, I mean that the vertex labels are [1, 2, ..., n]. It's trivial to convert any graph to non-vertex-labelled form. So, without loss of generality, suppose that H is in that form. We represent automorphisms of as its edge set under a vertex permutation. An isomorphism cover of H is a set of n such edge-set automorphisms such that their pairwise intersections are all a single edge and the union of those intersections is the edge set of K[n], the complete graph on n vertices.

Here are two procedures. The 1st, Automorphs, finds all automorphisms of a graph. The 2nd, IsoCovers, finds all isomorphism covers.

Automorphs:= (G::Graph)->
local A:= op(4,G), n:= numelems(A), V:= [$n], p, E:= {seq}((op@`{}`~)~(V, A));
    {seq}(subs(V=~ p, E), p= combinat:-permute(n))
:
IsoCovers:= proc(H::Graph) 
local
    n:= nops(op(3,H)), E:= combinat:-choose({$n},2), J:= (`[]`@@2@op)~(E),  
    Ej:= {$nops(E)}, S:= subs(E=~ Ej, Automorphs(H)), R:= `{}`~(S), EJ:= `{}`~(Ej),
    P:= proc(s) option remember; local t:= s[1];
        if t::posint then return select(r-> nops(r intersect s) = 1, S) fi;
        `intersect`(thisproc(t), if nops(s)=1 then else thisproc(s[2..]) fi)
    end proc
;
    if nops(S[1]) < n-1 then return {} fi;
    to n-1 do R:= (r-> map(`{}`, P(r), r[])[])~(R) od;
    subs(Ej=~ E, select(r-> (p-> `intersect`(p[]))~(map2(`?[]`, r, J)) = EJ, R))
end proc
:
GT:= GraphTheory:
H:= GT:-Graph([$6], {{1,2}, {2,3}, {3,4}, {4,5}, {5,6}});
H := Graph 3: an undirected graph with 6 vertices and 5 edge(s)

S:= CodeTools:-Usage(IsoCovers(H)):
memory used=1.55GiB, alloc change=0.64GiB, 
cpu time=28.86s, real time=19.36s, gc time=11.50s

nops(%);
                             11640
S[1];
          {{{1, 2}, {1, 3}, {2, 4}, {3, 5}, {4, 6}}, 
            {{1, 2}, {1, 4}, {2, 3}, {3, 6}, {5, 6}}, 
            {{1, 3}, {2, 6}, {3, 4}, {4, 5}, {5, 6}}, 
            {{1, 4}, {1, 6}, {2, 5}, {2, 6}, {3, 5}}, 
            {{1, 5}, {1, 6}, {2, 4}, {3, 6}, {4, 5}}, 
            {{1, 5}, {2, 3}, {2, 5}, {3, 4}, {4, 6}}}

 

Like this

subsindets(t, 'suffixed'('x'), x-> y||(String(x)[2..]))

The above will work for x followed by anything (including nothing, i.e., x itself). If you only want to change x followed by a nonnegative integer, then modify that to

subsindets(t, 'suffixed'('x', nonnegint), x-> y||(String(x)[2..]))

Using subsindets works in situations far more general than the solutions given by @nm or @mmcdara. To handle one of the latter's obscure cases, replace nonnegint with {1, 4, 6, 10}.

If any method given in this thread is applied to an x... variable declared local, the resulting y... variable will not be local.

The command to solve it is

sol:= dsolve({diff(f(x), x) = a-a/((1+a*x)*(1/(1+a*x))^a)-a*f(x), f(0)=b});

The solution is expressed in terms of an unevaluated integral. This integral can be easily done for any nonnegative integer a, for example

value(eval(sol, a= 23));

If this Answer is sufficient, then so be it. If not, let me know, and we can get something by putting restrictions on x, such as x > -1/a for a > 0.

You have polygonplot inside the draw command.

Your follow-up Question regarding Categorize is quite interesting. Actually, it's much more efficient to do this with ListTools:-Classify. Here's how:

Classifying a set of sets of sets by pairwise intersections

2023-May-9

Author: Carl Love <carl.j.love@gmail.com>

 

Given a set of sets S, we want to find all 3-subsets S3 with these properties:

1. 

The intersection of S3 is empty;

2. 

All pairwise intersections of S3 are singletons;

3. 

The union of those pairwise intersections has three elements.

Then we want to Classify the 3-subsets that have those properties by the union mentioned in the 3rd property.

restart
:

Here is a set from MaplePrimes:

L:= {
    {{0, 1}, {0, 3}, {0, 5}, {0, 7}, {2, 9}}, {{0, 1}, {0, 3}, {0, 5}, {0, 7}, {4, 9}},
    {{0, 1}, {0, 3}, {0, 5}, {0, 7}, {6, 9}}, {{0, 1}, {0, 3}, {0, 5}, {0, 7}, {8, 9}},
    {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {4, 7}},
    {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {6, 7}}, {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {7, 8}},
    {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {2, 5}}, {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {4, 5}},
    {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {5, 6}}, {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {5, 8}},
    {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {2, 3}}, {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {3, 4}},
    {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {3, 6}}, {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {3, 8}},
    {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {3, 8}}, {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {5, 8}},
    {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {7, 8}}, {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {8, 9}},
    {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {3, 6}}, {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {5, 6}},
    {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {6, 7}}, {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {6, 9}},
    {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {3, 4}}, {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {4, 5}},
    {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {4, 7}}, {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {4, 9}},
    {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 3}}, {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 5}},
    {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 7}}, {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 9}},
    {{0, 1}, {2, 3}, {2, 5}, {2, 7}, {2, 9}}, {{0, 1}, {2, 3}, {3, 4}, {3, 6}, {3, 8}},
    {{0, 1}, {2, 5}, {4, 5}, {5, 6}, {5, 8}}, {{0, 1}, {2, 7}, {4, 7}, {6, 7}, {7, 8}},
    {{0, 1}, {2, 9}, {4, 9}, {6, 9}, {8, 9}}, {{0, 1}, {3, 4}, {4, 5}, {4, 7}, {4, 9}},
    {{0, 1}, {3, 6}, {5, 6}, {6, 7}, {6, 9}}, {{0, 1}, {3, 8}, {5, 8}, {7, 8}, {8, 9}},
    {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 4}},
    {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 6}}, {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 8}},
    {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {1, 2}, {2, 5}, {2, 7}, {2, 9}},
    {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {1, 4}, {2, 3}, {3, 6}, {3, 8}},
    {{0, 3}, {1, 4}, {4, 5}, {4, 7}, {4, 9}}, {{0, 3}, {1, 6}, {2, 3}, {3, 4}, {3, 8}},
    {{0, 3}, {1, 6}, {5, 6}, {6, 7}, {6, 9}}, {{0, 3}, {1, 8}, {2, 3}, {3, 4}, {3, 6}},
    {{0, 3}, {1, 8}, {5, 8}, {7, 8}, {8, 9}}, {{0, 3}, {2, 3}, {3, 4}, {3, 6}, {5, 8}},
    {{0, 3}, {2, 3}, {3, 4}, {3, 6}, {7, 8}}, {{0, 3}, {2, 3}, {3, 4}, {3, 6}, {8, 9}},
    {{0, 3}, {2, 3}, {3, 4}, {3, 8}, {5, 6}}, {{0, 3}, {2, 3}, {3, 4}, {3, 8}, {6, 7}},
    {{0, 3}, {2, 3}, {3, 4}, {3, 8}, {6, 9}}, {{0, 3}, {2, 3}, {3, 6}, {3, 8}, {4, 5}},
    {{0, 3}, {2, 3}, {3, 6}, {3, 8}, {4, 7}}, {{0, 3}, {2, 3}, {3, 6}, {3, 8}, {4, 9}},
    {{0, 3}, {2, 5}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 5}, {4, 5}, {5, 6}, {5, 8}},
    {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}},
    {{0, 3}, {2, 9}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 9}, {4, 9}, {6, 9}, {8, 9}},
    {{0, 5}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 5}, {1, 2}, {2, 3}, {2, 7}, {2, 9}},
    {{0, 5}, {1, 2}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {1, 4}, {2, 5}, {5, 6}, {5, 8}},
    {{0, 5}, {1, 4}, {3, 4}, {4, 7}, {4, 9}}, {{0, 5}, {1, 6}, {2, 5}, {4, 5}, {5, 8}},
    {{0, 5}, {1, 6}, {3, 6}, {6, 7}, {6, 9}}, {{0, 5}, {1, 8}, {2, 5}, {4, 5}, {5, 6}},
    {{0, 5}, {1, 8}, {3, 8}, {7, 8}, {8, 9}}, {{0, 5}, {2, 3}, {3, 4}, {3, 6}, {3, 8}},
    {{0, 5}, {2, 3}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {2, 5}, {3, 4}, {5, 6}, {5, 8}},
    {{0, 5}, {2, 5}, {3, 6}, {4, 5}, {5, 8}}, {{0, 5}, {2, 5}, {3, 8}, {4, 5}, {5, 6}},
    {{0, 5}, {2, 5}, {4, 5}, {5, 6}, {7, 8}}, {{0, 5}, {2, 5}, {4, 5}, {5, 6}, {8, 9}},
    {{0, 5}, {2, 5}, {4, 5}, {5, 8}, {6, 7}}, {{0, 5}, {2, 5}, {4, 5}, {5, 8}, {6, 9}},
    {{0, 5}, {2, 5}, {4, 7}, {5, 6}, {5, 8}}, {{0, 5}, {2, 5}, {4, 9}, {5, 6}, {5, 8}},
    {{0, 5}, {2, 7}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {2, 7}, {4, 7}, {6, 7}, {7, 8}},
    {{0, 5}, {2, 9}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {2, 9}, {4, 9}, {6, 9}, {8, 9}},
    {{0, 7}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 7}, {1, 2}, {2, 3}, {2, 5}, {2, 9}},
    {{0, 7}, {1, 2}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {1, 4}, {2, 7}, {6, 7}, {7, 8}},
    {{0, 7}, {1, 4}, {3, 4}, {4, 5}, {4, 9}}, {{0, 7}, {1, 6}, {2, 7}, {4, 7}, {7, 8}},
    {{0, 7}, {1, 6}, {3, 6}, {5, 6}, {6, 9}}, {{0, 7}, {1, 8}, {2, 7}, {4, 7}, {6, 7}},
    {{0, 7}, {1, 8}, {3, 8}, {5, 8}, {8, 9}}, {{0, 7}, {2, 3}, {3, 4}, {3, 6}, {3, 8}},
    {{0, 7}, {2, 3}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {2, 5}, {4, 5}, {5, 6}, {5, 8}},
    {{0, 7}, {2, 5}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {2, 7}, {3, 4}, {6, 7}, {7, 8}},
    {{0, 7}, {2, 7}, {3, 6}, {4, 7}, {7, 8}}, {{0, 7}, {2, 7}, {3, 8}, {4, 7}, {6, 7}},
    {{0, 7}, {2, 7}, {4, 5}, {6, 7}, {7, 8}}, {{0, 7}, {2, 7}, {4, 7}, {5, 6}, {7, 8}},
    {{0, 7}, {2, 7}, {4, 7}, {5, 8}, {6, 7}}, {{0, 7}, {2, 7}, {4, 7}, {6, 7}, {8, 9}},
    {{0, 7}, {2, 7}, {4, 7}, {6, 9}, {7, 8}}, {{0, 7}, {2, 7}, {4, 9}, {6, 7}, {7, 8}},
    {{0, 7}, {2, 9}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {2, 9}, {4, 9}, {6, 9}, {8, 9}},
    {{0, 9}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 9}, {1, 2}, {2, 3}, {2, 5}, {2, 7}},
    {{0, 9}, {1, 2}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {1, 4}, {2, 9}, {6, 9}, {8, 9}},
    {{0, 9}, {1, 4}, {3, 4}, {4, 5}, {4, 7}}, {{0, 9}, {1, 6}, {2, 9}, {4, 9}, {8, 9}},
    {{0, 9}, {1, 6}, {3, 6}, {5, 6}, {6, 7}}, {{0, 9}, {1, 8}, {2, 9}, {4, 9}, {6, 9}},
    {{0, 9}, {1, 8}, {3, 8}, {5, 8}, {7, 8}}, {{0, 9}, {2, 3}, {3, 4}, {3, 6}, {3, 8}},
    {{0, 9}, {2, 3}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {2, 5}, {4, 5}, {5, 6}, {5, 8}},
    {{0, 9}, {2, 5}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {2, 7}, {4, 7}, {6, 7}, {7, 8}},
    {{0, 9}, {2, 7}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {2, 9}, {3, 4}, {6, 9}, {8, 9}},
    {{0, 9}, {2, 9}, {3, 6}, {4, 9}, {8, 9}}, {{0, 9}, {2, 9}, {3, 8}, {4, 9}, {6, 9}},
    {{0, 9}, {2, 9}, {4, 5}, {6, 9}, {8, 9}}, {{0, 9}, {2, 9}, {4, 7}, {6, 9}, {8, 9}},
    {{0, 9}, {2, 9}, {4, 9}, {5, 6}, {8, 9}}, {{0, 9}, {2, 9}, {4, 9}, {5, 8}, {6, 9}},
    {{0, 9}, {2, 9}, {4, 9}, {6, 7}, {8, 9}}, {{0, 9}, {2, 9}, {4, 9}, {6, 9}, {7, 8}},
    {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}},
    {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}, {{1, 2}, {2, 3}, {2, 5}, {2, 9}, {4, 7}},
    {{1, 2}, {2, 3}, {2, 5}, {2, 9}, {6, 7}}, {{1, 2}, {2, 3}, {2, 5}, {2, 9}, {7, 8}},
    {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}},
    {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 4}},
    {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 6}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 8}},
    {{1, 2}, {3, 4}, {4, 5}, {4, 7}, {4, 9}}, {{1, 2}, {3, 6}, {5, 6}, {6, 7}, {6, 9}},
    {{1, 2}, {3, 8}, {5, 8}, {7, 8}, {8, 9}}, {{1, 4}, {2, 3}, {2, 5}, {2, 7}, {2, 9}},
    {{1, 4}, {2, 3}, {4, 5}, {4, 7}, {4, 9}}, {{1, 4}, {2, 5}, {3, 4}, {4, 7}, {4, 9}},
    {{1, 4}, {2, 7}, {3, 4}, {4, 5}, {4, 9}}, {{1, 4}, {2, 9}, {3, 4}, {4, 5}, {4, 7}},
    {{1, 4}, {3, 4}, {4, 5}, {4, 7}, {6, 9}}, {{1, 4}, {3, 4}, {4, 5}, {4, 7}, {8, 9}},
    {{1, 4}, {3, 4}, {4, 5}, {4, 9}, {6, 7}}, {{1, 4}, {3, 4}, {4, 5}, {4, 9}, {7, 8}},
    {{1, 4}, {3, 4}, {4, 7}, {4, 9}, {5, 6}}, {{1, 4}, {3, 4}, {4, 7}, {4, 9}, {5, 8}},
    {{1, 4}, {3, 6}, {4, 5}, {4, 7}, {4, 9}}, {{1, 4}, {3, 6}, {5, 6}, {6, 7}, {6, 9}},
    {{1, 4}, {3, 8}, {4, 5}, {4, 7}, {4, 9}}, {{1, 4}, {3, 8}, {5, 8}, {7, 8}, {8, 9}},
    {{1, 6}, {2, 3}, {2, 5}, {2, 7}, {2, 9}}, {{1, 6}, {2, 3}, {5, 6}, {6, 7}, {6, 9}},
    {{1, 6}, {2, 5}, {3, 6}, {6, 7}, {6, 9}}, {{1, 6}, {2, 7}, {3, 6}, {5, 6}, {6, 9}},
    {{1, 6}, {2, 9}, {3, 6}, {5, 6}, {6, 7}}, {{1, 6}, {3, 4}, {4, 5}, {4, 7}, {4, 9}},
    {{1, 6}, {3, 4}, {5, 6}, {6, 7}, {6, 9}}, {{1, 6}, {3, 6}, {4, 5}, {6, 7}, {6, 9}},
    {{1, 6}, {3, 6}, {4, 7}, {5, 6}, {6, 9}}, {{1, 6}, {3, 6}, {4, 9}, {5, 6}, {6, 7}},
    {{1, 6}, {3, 6}, {5, 6}, {6, 7}, {8, 9}}, {{1, 6}, {3, 6}, {5, 6}, {6, 9}, {7, 8}},
    {{1, 6}, {3, 6}, {5, 8}, {6, 7}, {6, 9}}, {{1, 6}, {3, 8}, {5, 6}, {6, 7}, {6, 9}},
    {{1, 6}, {3, 8}, {5, 8}, {7, 8}, {8, 9}}, {{1, 8}, {2, 3}, {2, 5}, {2, 7}, {2, 9}},
    {{1, 8}, {2, 3}, {5, 8}, {7, 8}, {8, 9}}, {{1, 8}, {2, 5}, {3, 8}, {7, 8}, {8, 9}},
    {{1, 8}, {2, 7}, {3, 8}, {5, 8}, {8, 9}}, {{1, 8}, {2, 9}, {3, 8}, {5, 8}, {7, 8}},
    {{1, 8}, {3, 4}, {4, 5}, {4, 7}, {4, 9}}, {{1, 8}, {3, 4}, {5, 8}, {7, 8}, {8, 9}},
    {{1, 8}, {3, 6}, {5, 6}, {6, 7}, {6, 9}}, {{1, 8}, {3, 6}, {5, 8}, {7, 8}, {8, 9}},
    {{1, 8}, {3, 8}, {4, 5}, {7, 8}, {8, 9}}, {{1, 8}, {3, 8}, {4, 7}, {5, 8}, {8, 9}},
    {{1, 8}, {3, 8}, {4, 9}, {5, 8}, {7, 8}}, {{1, 8}, {3, 8}, {5, 6}, {7, 8}, {8, 9}},
    {{1, 8}, {3, 8}, {5, 8}, {6, 7}, {8, 9}}, {{1, 8}, {3, 8}, {5, 8}, {6, 9}, {7, 8}}
}:

nops(L), nops~(L), (nops~)~(L), nops(`union`(L[]));

200, {5}, {{2}}, 25

So, we have a total of 25 2-element sets---edges---which we'll consider to be the fundamental elements for the rest of this process. From this 25-set, 200 5-subsets have been given as L, which for comvenience I've converted from a list to a set.

 

Just to help to put this into context and to encourage visual thinking, let's look at the graph formed by those 25 edges. However, this graph is not used computationally in what follows.

Edges:= `union`(L[]):
GT:= GraphTheory:
GT:-DrawGraph((G:= GT:-Graph(Edges)));

So, it's the complete bipartite graph K(5,5).

Classify3:= (S::{list, set}(set))->
local S3, C3_2:= `[]`~({combinat:-choose(3,2)[]}), P;
    ListTools:-Classify(
        S3,
        select(
            t-> `intersect`(t[]) = {} and
                nops~((P:= (p-> `intersect`(p[]))~(map2(`?[]`, t, C3_2)))) = {1} and
                nops((S3(t):= `union`(P[]))) = 3,
            combinat:-choose(S,3)
        )
     )
:

T3:= CodeTools:-Usage(Classify3(L)):

memory used=3.79GiB, alloc change=11.28MiB, cpu time=66.39s, real time=37.62s, gc time=33.44s

To reduce the visual burden, we replace each element of L by its index in L:

T3view:= map(subsindets[2], T3, set(set(integer)), table([L[]] =~ [$nops(L)]), index):
        

Example: Pick a random set of 3 edges:

j:= combinat:-randcomb(Edges, 3);

{{0, 3}, {1, 2}, {2, 7}}

So all of the 3-subsets of L that have the desired 3 properties with respect to those edges are

T3view[j];

{{5, 45, 141}, {5, 45, 142}, {5, 45, 143}, {5, 45, 147}, {5, 45, 148}, {5, 45, 149}, {5, 45, 150}, {5, 45, 151}, {5, 45, 152}, {5, 47, 141}, {5, 47, 142}, {5, 47, 143}, {5, 47, 147}, {5, 47, 148}, {5, 47, 149}, {41, 65, 141}, {41, 65, 142}, {41, 65, 143}, {41, 65, 147}, {41, 65, 148}, {41, 65, 149}, {41, 66, 141}, {41, 66, 142}, {41, 66, 143}, {41, 66, 147}, {41, 66, 148}, {41, 66, 149}, {41, 66, 150}, {41, 66, 151}, {41, 66, 152}, {45, 65, 70}, {45, 65, 118}, {45, 65, 141}, {45, 65, 142}, {45, 65, 143}, {45, 65, 147}, {45, 65, 148}, {45, 65, 149}, {45, 66, 70}, {45, 66, 118}, {45, 66, 141}, {45, 66, 142}, {45, 66, 143}, {45, 66, 147}, {45, 66, 148}, {45, 66, 149}, {45, 66, 150}, {45, 66, 151}, {45, 66, 152}, {47, 66, 70}, {47, 66, 118}, {47, 66, 141}, {47, 66, 142}, {47, 66, 143}, {47, 66, 147}, {47, 66, 148}, {47, 66, 149}}

Or, viewed in their original form:

subsindets[2](%, integer, L, index);

{{{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 4}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 6}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 8}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}}, {{{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 4}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 6}}}, {{{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 8}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{0, 5}, {1, 2}, {2, 3}, {2, 7}, {2, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{0, 9}, {1, 2}, {2, 3}, {2, 5}, {2, 7}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 5}, {1, 2}, {2, 3}, {2, 7}, {2, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 9}, {1, 2}, {2, 3}, {2, 5}, {2, 7}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 4}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 6}}}, {{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 8}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 5}, {1, 2}, {2, 3}, {2, 7}, {2, 9}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 9}, {1, 2}, {2, 3}, {2, 5}, {2, 7}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}}, {{{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}}

Pick one of those to visualize:

t:= combinat:-randcomb(%,1)[];

{{{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}}

GT:-HighlightEdges~(
    G,
    [j, map(`minus`, t, j)[]],
    stylesheet=~ `[]`~(color=~ [black, red, green, blue], thickness= 4)
):

GT:-DrawGraph(G);

 

Download Classify3.mw

Elaborating upon @sursumCorda's suggestion in a way such that all can be done with a single command:

evalindets([sol], float, convert, rational)[];

I consider changing the printlevel to be mostly for debugging. A more formal way to see the output of inner statements is to use the print command, as in print(InnerThen).

The meaning of the error message is that Maple sees more than one independent variable, x and bn, and thus the command dsolve (which is for ODEs) can't be used for it. Indeed, since you have derivatives with respect to both of those variables, these are PDEs. If Maple can solve it at all (which seems unlikely to me), the command to use is pdsolve, not dsolve.

The DirectSearch package, available for free download from the Maple Applications Center, has numerous derivative-free minimizing routines including Brent's. All work in multiple dimensions and with constraints. Input can be algebraic expressions or numeric procedures.

The error message indicates that in one or more of your equations you used uppercase Zeta where you meant lowercase zeta. I can't tell from your screen shot where exactly you made that typo, but if you print out the equations after assigning the parameter values, you should see it.

It's much easier for us if instead of posting screenshots, you upload your worksheet by using the green up arrow on the toolbar of the MaplePrimes editor.

Here is a naive method, akin to just subdividing them by hand. It's likely less efficient than @dharr 's method. But I think it's relatively easy to understand.

SplitCycle:= (C::And(list, Not({0,1,2,3}) &under nops))->
local n:= nops(C), i, j;
    seq(seq([C[i..j], C[[j..-1, 1..i]]], j= i+2..`if`(i=1, n-1, n)), i= 1..n-2) 
:
Triangulate:= (Gs::set(set(list({integer, symbol, string}))))->
local r:= Gs, pc, pg, cs, g, c;
    while membertype(satisfies(g-> membertype(Not(3) &under nops, g, 'pc')), r, 'pg') do
        g:= r[pg];  c:= g[pc];
        r:= subsop(pg= seq(subsop(pc= cs[], g), cs= SplitCycle(c)), r)
    od
:
TrianglesToEdges:= (Ts::set(And(list, 3 &under nops)))->
    subsindets(Ts, list, T-> combinat:-choose({T[]}, 2)[])
:
PlotGs:= (GS::set(set(list)))->
local Gs:= GraphTheory:-Graph~(TrianglesToEdges~(GS));
    GraphTheory:-DrawGraph(Gs, 'width'= isqrt(nops(Gs)))       
:
PlotGs(Triangulate({{[$7]}}));

 

Change the solve command in the loop to

(R[i], X[i]):= eval([Rm, Xm], solve({gl1, gl2}, {Rm, Xm}))[];

Then the values that you want will be stored as R[1], ..., R[4] and X[1], ..., X[4].

Let me know if this does what you need.

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