Carl Love

Carl Love

25831 Reputation

25 Badges

10 years, 359 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

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.

Here is a detailed example of solving your system for the parameters a1a2, and a3. Since we want to obtain 3 values, we need to provide 3 additional boundary conditions.

restart
:
eq1:= diff(f(x),x$3) + (cos(alpha)*x + sin(alpha)*f(x))/2*diff(f(x),x$2):
eq2:=
    diff(g(x),x$2) + diff(g(x),x)*(1 + diff(h(x),x) + cos(alpha)*x)
    + sin(alpha)*f(x)*g(x):
eq3:= diff(g(x),x$2) + diff(h(x),x$2) + (cos(alpha)*x+sin(alpha)*f(x))/2
:
ics:=
    f(0) = 0, D(f)(0) = 1, (D@@2)(f)(0) = a1,
    g(0) = 1, D(g)(0) = a2,
    h(0) = 1, D(h)(0) = a3
:
(*
 
To solve for a1, a2, a3, we pick a value of x>0 (called ub here) and give any 3
algebraic equations involving some of {f, f', f'', g, g', h, h'} evaluated
at x= ub.  These equations cannot use symbolic x, only x=ub. The equations
do not need to use a1, a2, or a3, nor do they need to use all of f, g, and h.

*)
ub:= 1:  bcs:= f(ub) = 1, g(ub) = 1, h(ub) = 4
:
alpha:= Pi/4
:
sol:= dsolve({eq||(1..3), ics, bcs}, numeric, range= 0..ub)
:

# Get the values of a1, a2, a3:
a||(1..3) =~ eval([a||(1..3)], sol(0));

[a1 = HFloat(-3.1095161290988124e-16), a2 = HFloat(0.22323816712844022), a3 = HFloat(2.894612963069318)]

plots:-odeplot(
    sol, `[]`~(x, [f,g,h](x)), 0..ub, color=[red, blue, green], legend= [f,g,h]
);

(*
 
The current numeric solution functions returned by dsolve are limited to
0 <= x <= ub. However, if you need, dsolve can be used again to obtain new solution
functions that will work outside that range.

Let me know if you need this.

*)

 

Download BVP_solve_params.mw

While in Maple, use Export from the File menu to save your document or worksheet as a PDF file. Then access that PDF from your phone. There are many free apps for displaying a PDF on your phone.

Here's a procedure for it. If you give a writable filename as the second argument, then it will write text to that file. Otherwise, it'll display it on your screen.

GraphsToRGraphs:= proc(
    Gs::list(set(And(set(posint), 2 &under nops))), 
    file::{string, symbol}:= 'terminal'
)
local k, G, E, n, fp, pf:= curry(fprintf, fp);
    try fp:= `if`(file = 'terminal', file, fopen(file, WRITE))
    catch: fp:= 'terminal'
    end try; 
    pf("[\n");
    for k,G in Gs do
        E:= [G[]];
        n:= nops(E)-1;
        if k>1 then pf(",\n\n") fi;
        pf(cat("    from <- c(", "%d,"$n, "%d),\n"), op~(1,E)[]);
        pf(cat("    to <- c(", "%d,"$n, "%d),\n"), op~(2,E)[]);
        pf("    ft <- cbind(from, to),\n");
        pf("    Graph%d <- ftM2graphNEL(ft)", k)
    od;
    pf("\n]\n");
    if file <> 'terminal' then fclose(fp) fi;
    return
end proc
:
GraphsToRGraphs(
    [
        {{1,2},{2,3},{3,4},{4,5}},  
        {{1, 2}, {1, 7}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}}
    ]
);
[
    from <- c(1,2,3,4),
    to <- c(2,3,4,5),
    ft <- cbind(from, to),
    Graph1 <- ftM2graphNEL(ft),

    from <- c(1,1,2,3,4,5,6),
    to <- c(2,7,3,4,5,6,7),
    ft <- cbind(from, to),
    Graph2 <- ftM2graphNEL(ft)
]

 

The keyword static only makes sense when declaring a local or export of an object. The line in question is a reassignment, not a declaration, as we discussed yesterday. I'm amazed that the basic syntax checker (i.e., without using assertlevel= 2) allowed it at all. 

However, Maple syntax does allow you to do a lot of crazy things (which will usually cause you trouble later). For example, you could create a type named static. By no means am I saying that you should do it; just that Maple would allow you to if you were crazy enough to do it.

Although &+- does mean something typographically to Maple, it doesn't know it as a mathematical function. In particular, it doesn't know its derivative. So, it applies the chain rule and expresses the result in terms of that unknown derivative, just like it would do for diff(f(x^2), x). You can easily teach Maple the derivative:

`diff/&+-`:= (y,x)-> diff(y,x);

Then

diff(&+-(x^2), x);

will show what you asked for.

First 6 7 8 9 10 11 12 Last Page 8 of 375