## Function on sets....

What Maple function answers the following:

Produce (a minimal set of) sets that generate, by union, every intersection of sets given.

Examples:
F({1, 2, 3}, {1, 4, 5}, {2, 3, 4});

{}, {1}, {4}, {5}, {2, 3};

F({1, 2, 3, 6}, {1, 4, 5, 6}, {2, 3, 4, 6});
{1}, {4}, {5}, {6}, {2, 3};

Correction:
Produce (a minimal set of) disjoint sets that generate, by union, every intersection of sets given.

Intersection and union here are n-ary operators and every combination of sets is considered for intersection.

## Solve the non-linear ODE by using Runge-Kutta 4th ...

I have attached a maplework please check it. I want to solution graph by using RK 4th order with shooting technique or RK Fehlberg method. help.mw

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/help.mw .

## How do i sketch 3d graph in maple?...

Sketch the 3d graph of solid bounded inside a sphere of x²+y²+z²=4z and below a cone z=√(x²+y²) on xy-plane.

## getting odetest to verify this Maple solution...

Any one has smart way to help verify this Maple solution to this ODE? I can't figure it out

```restart;
ode:=diff(y(x),x)-y(x) = x*y(x)^(1/2):
ic:= y(0)=4:
maple_sol:=dsolve([ode,ic],'implicit'):
the_diff_1:=odetest( (lhs-rhs)(maple_sol)=0,[ode,ic]);

maple_sol:=dsolve([ode,ic],'explicit'):
the_diff_2:=odetest( (lhs-rhs)(maple_sol)=0,[ode,ic]);
```

Tried few simplifications but not everything. I am assuming Maple solution is correct.

Maple 2021.1

## Re: Symbolic operation using functions...

Hello there,

While I was trying to calculate the complex (i.e., P and Q) power equations, I got this question.

Thus, I wonder if I can have a chance to ask the question here:

a. When the voltage and current are defined as functions, taking the t (time) as a input variable, I was not able to get the proper outcome from the operation. Those attempts are labeled as '#1' and '#2' in the attached worksheet.

b. When the voltage and current are defined as simple complex expression, I was able to see what I wanted. The expression is named as 'ideal' in the attached worksheet.

c. Therefore, my question is to see if there is a way to make the operaion using the functions in the same way as done by the simple expressions.

d. Any insight would be appreciated.

Thank you.

Q20210617.mw

## Solve with assuming fails to incorporates the assu...

Dear Fellows, greetings

I am solving a system of equations under some assumptions and those assupmtions are a must to impose. However maple fails to apply those while solving the equations. For example solution 4 gives b=c as a solution but in assumtion it is clrealy mentioned that b<>c. Kindly guide me what mistake am I making in the code.

System_problem.mw

## Inconsistent(?) Dataframe indexing...

Background

This 'quirk' of Maple behaviour cropped up when I was considering solutions for the question posted here

https://www.mapleprimes.com/questions/232433-Extract-From-Record

where the OP had "poorly structured" data which meant it was a bit "awkward" to access required fields. A number of more-or-less satisfactory solution were proposed, and the OP seems happy

The Issue

One possible way to solve the original problem would be to restructure the data as a DataFrame. The "natural" way to do this would be to use numeric row indexes.. Note that these row indexes are not contiguous, and are in no particular order. However using this approach means that accessing fields from the dataframe is not consistent.

Sometimes the supplied row label is interpreted as a 'label', sometimes it is interpreted as the "row number". It appears that the latter interpretation is preferentially used

I can't make up my mind whether to call this a "bug" or not, but I can see the inconsistent interpretation resulting in chaos.

Before submitting an SCR I'd like to know if anyone else sees this as a bug

Consider the code

```  restart;
prettyprint=1:
#
# data
#
S := [`206` = Record(mu = 508.001018040,  sigma = 125.002863204708),
`4` = Record(mu = 1008.001018040, sigma = 167.707232430134),
`2` = Record(mu = 1208.001018040, sigma = 141.512246146314),
`5` = Record(mu = 808.001018040,  sigma = 117.156800098735)
]:
#
# Construct the above as a dataframe - note row labels are numbers!
#
DF:= DataFrame( Matrix([seq( [rhs(j):-mu, rhs(j):-sigma], j in S)]),
rows= [seq( parse( lhs(j) ), j in S)],
columns=[mu, sigma]
);
DF[206, mu];
DF[2, mu];  ## Errr No!
DF[5, sigma];
[           mu             sigma      ]
[                                     ]
[206  508.001018040   125.002863204708]
[                                     ]
DF := [ 4   1008.001018040  167.707232430134]
[                                     ]
[ 2   1208.001018040  141.512246146314]
[                                     ]
[ 5   808.001018040   117.156800098735]

508.001018040

1008.001018040

117.156800098735

```

Note that DF[2, mu] outputs the entry from the second row - not the one from the row labelled with the number 2

I imagina a similar issue would occur with numeric column indexes, although I haven't tried this

## Extract from record...

Hi

I have a list of records :

S := [`206` = Record(mu = 508.001018040, sigma = 125.002863204708), `4` = Record(mu = 1008.001018040, sigma = 167.707232430134), `2` = Record(mu = 1208.001018040, sigma = 141.512246146314), `5` = Record(mu = 808.001018040, sigma = 117.156800098735)]

How can I extract from S the mu and sd corresponding to a number.

eg input 2 get 1208.001018040,141.512246146314

like this:  rhs(S[3]):-mu, rhs(S[3]):-sigma, (I know from inpection 2 occurs in the 3rd slot but assume i don't know where it occurs). I tried using Search...

## How to determine the concavity of an unknown funct...

Suppose we have an unknown parametric function like g(x). We do not know the exact form but we know that g(x) is increasing and concave. Also, we define h(x) = g(x)*f(x) where we know the exact form of f(x) like f(x)=2x+5. Here, I want to investigate if the function h(x) is concave or not. How is it possible to do this?

Thanks

## Why can neither solve nor SolveEquations find a co...

In this worksheet the solve command almost immediately gives up and DirectSearch[SolveEquations] is erratic.

For some triangle/inellipse points of tangency the latter provides a nonsense answer and for others it produces an almost correct solution.

Is there a set of conditions which determine the possibility of an inellipse within a triangle?

Inellipse.mw

A responder will have to establish a connection to the DirectSearch package.

## How to make this Embedded Component- based app to ...

Hi,

Here is my first attempt to work with Embedded Components.
I loaded the "Bezier curve" example ("how to drag points") and the "Linear Regression" one ("how to add points") from the MathApps, merge the codes and modified them in order to draw a polygon with an arbitrary number of sides.

After many unsuccessful attempts I begin to understand the mogic behind Embedded Components (I'm familiar with Maplets and I'm sure this didn't help me).
For now , I am able to define points, drag them, and erase everything. A small step for Mankind but a huge step for me.

What I would like to do now is to erase some points.
The basic code is

```# Plot1 is the PlotComponent
# The list of the points is pt
#
# x0 and y0 are the co-ordinates of the point to remove from pt
# _removing is the number of the point in pt closest to (x0, y0)
#
# Update is the procedure which does the plot in Plot1

Remove := proc()
x0 := DO(%Plot1( "clickx" ) );
y0 := DO(%Plot1( "clicky" ) );
d := map(n -> add((pt[n]-~[x0, y0])^~2), [\$1..nops(pt)]):
_removing := sort(d, output=permutation)[1];
subsop(_removing=NULL, pt);
Update();
end proc;```

Unfortunately I don't understand well enough the logic of  Embedded Components to make this work

Can you help me fix this?
TIA

sketch.mw

PS: In procedure Update I define two plots named fond (=background) and grille (=grid): grille is a workaround to "toggle gridlines" or 'gridlines'=true for none of these options work for me (Maple 2015.2, Mac OSX Mojave)

## Problems With Creating a Slider...

Hi,

I have have been trying to creat a slider and use the value as a "variable" to vary the sin function..

I tried many things and can't seem to get iit to work...any suggestions woul be appreciated..I am still brand new to Maple

I have searched Application center..and spend hours trying to get this right...I am attacing my worksheet

Frank

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/CreatingSlider.mw .