janhardo

935 Reputation

13 Badges

11 years, 348 days
B. Ed math

MaplePrimes Activity


These are replies submitted by janhardo

@Alfred_F 
Earlier versions of  Maple :  Maple's start-up message, 'Command the brilliance of 1,000 mathematicians'. :-)
 

Thus, from a mathematician’s perspective, this framework is essentially a symbolic ansatz engine expressed in neural-network notation. This also explains why the method ultimately yields explicit analytical formulas, such as Equation (12), rather than a trained predictive model.

In other words, the neural-network architecture serves primarily as a structured language for generating candidate solution families, while the actual determination of the parameters is carried out analytically through algebraic constraints derived from the differential equation. The process therefore resembles symbolic computation and exact-solution techniques far more than modern machine-learning approaches based on optimization and training.

@Alfred_F 
 "It's a shame that it's not as comfortable as in Cabri."  
But Cabri is not Maple and will probably never be  , so this comparison ?

with(plots):
p := [[3,6],[1,0],[4,2],[5,1]]:
X := map2(op,1,p): Y := map2(op,2,p):
display(
    polygonplot(p, color="Honeydew", thickness=2),
    pointplot([seq(seq([i,j], i=min(X)..max(X)), j=min(Y)..max(Y))], symbol=circle),
    pointplot(p, symbol=solidcircle, color="Red"),
    symbolsize=20, scaling=constrained, axes=none
);

Probably shortest code possibly ?, that's why i posted it 

Must be something in  a fraction :  value/0  , is this in de differential equation possible?

@acer 
Thanks, yes  this is better with the + option , because in case of a single term for the missing[i]  value 
"convert(missing[i], list) splits a product like 5*x*y into [5, x, y] instead of [5*x*y]." (as example here)

[seq(seq(subsop(i = model[i] + t, model), t = convert(missing[i], list, `+`)), i = 1..n)];

Example of an efficient constructor:

maple

[seq(seq(subsop(i = model[i] + t, model), t = convert(missing[i], list, `+`)), i = 1..n)]

The inner seq produces a sequence of new models for a fixed i.

The outer seq combines all those sequences into one long sequence.

The square brackets [ ... ] convert that sequence into a list in one go.

There is no repeated [op(result), new]; no intermediate lists are copied. Therefore this constructor is O(n) in time and memory. This is in contrast to a loop with result := [op(result), new], which is O(n²).

In short: a list constructor (square brackets around a sequence) is the correct, efficient way to create a list from a sequence of elements.

@emendes 
I didn't write the code myself, but you did, which is a greater achievement..
A good introduktion code book is: Mathematical Computing - An  introduction to programming using Maple 

This is whole new approach for your coding problem

🧠 The Big Idea

The old code treats algebra as:

“a mathematical object that must be analyzed”

The new code treats algebra as:

“a data structure that can be manipulated directly”

And that is what makes it extremely fast.

Those polynomials are a datastructure in Maple 
"That is indeed correct: in Maple, polynomials are stored internally as a data structure (a DAG of operators such as +, *, ^). The terms of a sum are the operands of the + node.
By using convert(expr, list), you read those operands directly – without any mathematical interpretation. That is precisely why the new code is so fast."

generateNonlinearModelsPlusFast := proc(model::list, fullmodel::list, vars::list := [])
local missing, i, n, t;
    n := nops(model);
    missing := [seq(expand(fullmodel[i] - model[i]), i = 1..n)];
    [seq(seq(subsop(i = model[i] + t, model), t = convert(missing[i], list)), i = 1..n)];
end proc:

That's all what is left from your old code :-) , i am sorry
 

This code is aso using the datastructure approach for polynomials , but is less efficient
The first code is a improvement of this code 

#################################################
# NIEUWE ULTRAFAST VERSIE
#################################################

generateNonlinearModelsPlusFast :=

proc(model::list,
     fullmodel::list)

local missing,
      result,
      terms,
      i,
      t;

    missing := map2(

        (a,b) -> expand(b-a),

        model,
        fullmodel

    );

    result := [];

    for i from 1 to nops(model) do

        if type(missing[i], `+`) then

            terms := [op(missing[i])];

        else

            terms := [missing[i]];

        end if;

        for t in terms do

            result := [

                op(result),

                subsop(
                    i = model[i] + t,
                    model
                )

            ];

        end do;

    end do;

    return result;

end proc:

"@Alfred_F The beauty of the result you mentioned in the title is generated by the theoretical fact, not by some animations for a chord on a curve (easy to obtain)."
There are another 50 different proofs for this , if this is the correct number ?:-)

Its like the Phytagorian rule ..

I replaced the KroneckerRules module because it had reached the limits of its simplification capabilities.

This new module to build, uses a tensor-based approach and works structurally.

@Harry Garst 
dimensie_regels_voor_kronecker_en_gewone_matrices_10-5-2026.mw

Using these rules, you can determine which matrix dimensions to use and what the result of the matrix calculation will be of the dimension of the resulting matrix.

@Harry Garst 
I am interested in your code, but of course you’re keeping that to yourself :-)
Upload the existing code to the AI and ask for an educational explanation of the code, or request an explanation of how the code works for a presentation to others.
groet  Jan

matrixcalus_module_8-5-2026_.mw

It turns out that incorporating the entire factor analysis model into the module code is a step too far, and it is recommended to use Maple for this purpose instead.

The module code does contain some educational factor model commands, but they aren't suitable for real statistical work, are they?
Some improvemnents further....

More matrix equations (polynome) to solve possible 
matrixcalus_module_7-5-2026.mw

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