janhardo

435 Reputation

8 Badges

10 years, 232 days

MaplePrimes Activity


These are replies submitted by janhardo

Lotka_Volterra system as start for experimentation with bifurcation 
Note: the spiral must be bigger ..
IterativeMaps:-Bifurcation ..use?
I do have extensive old  Maple studymateria from my education  for Lotka -Volterra , but it is not using ODE's, but works with difference equations, to study the phaseplot with equibrillium lines


lotka-volterra_bifurcatie_analyse_test_-25-8-2024.mw

Dynmod08_-_kopie.mws

@Paras31 
Getting a good plot in Maple is still a challence as a non-expert as i am.
You have done well.

@Paras31 
 

systems := [
    (x, y) -> y, 
    (x, y) -> -delta * y - alpha * x - beta * x^3 + gamma * cos(omega * t)
];

Conclusion:

For the given system with a time-dependent forcing term gamma * cos(omega * t), there are no true equilibrium points in the classical sense because the term gamma * cos(omega * t) is time-dependent and prevents the system from reaching a stationary point. 

Putting the system in the right input format of the Dsys procedure ,then you will probably see this phaseplot?
For t = 10 , this is a solution curve 

About Duffings eq : how about seeing it  in DSys procedure ?

Duffing_eq_as_system.mw

Possible to ad a list of ic , to show the solutioncurve better 
Adding population curves and add Explore for handling parameters?
Don't know if is possible to use a connected Phase plot with population curves ? 

faseplots_ics_not_ics24-8-2024Mprimes_evenwichtpunten_.mw

@Paras31 ,thanks
Another procedure , the same as yours example, need some adjustments 


faseplots_ics_not_ics23-8-2024Mprimes_evenwichtpunten.mw

Adding a procedure for plotting  phase plots 

22-8-2024_Mprimes_evenwichtpunten_Dsys

@Scot Gould , thanks for this exercise, get some help en ideas from it.  

@Paras31  i made it a little bit more userfriendly 

Mprimes21-8-20124sytem_ode_population_B.mw
 

with classification of equilibrium points
If the system is in equilibrium : the growth rates of both populations are then 0.

Mprimes21-8-20124sytem_ode_population_A_.mw

 

As a start..
Classification of equilibria for this purpose becomes a Jacobi matrix
used....
I see 6 classifications , let's see if the code can be modified to start classifying the type of equilibrium weight

Mprimes21-8-20124sytem_ode_populatin.mw

 

@salim-barzani :  userfriendly for experimentation

A adjustable integralcurve can be set in fieldplot, with initial value point for first order ode

module_20-8-2024-Odegeneratorplots_Mprimes_A.mw

 @salim-barzani ,   I, made  a more userfriendly version, with help and dfieldplot ..
For now the final Odegenerator procedure for first order ode ,  with odeadvisor , DataFrame row number for the fieldplot function, adding a rownumber : A,B, and C ..is  be substituted in ODE.


generatorfunctie_ode_Mprimes_postDEF_19-8-2024_var_methelp_dfieldplot_rownumber.mw

I made a procedure out of this code 
Further improvementt for a start could be a general ODE template for to generate values for the standard ODE's ( using the odeadvisor)
 

"maple.ini in users"

(1)

Odegenerator := proc(V, xi_sym, F_sym, eq_template) ## Engelse versie
    local xi, F, result, a, b, c, sol, Fsol, rows, numrows, eq, eq_check, count;

    # Initialize a list to store the rows for the DataFrame
    rows := [];

    # Counter for the number of generated printf messages
    count := 0;

    # Loop through all combinations of a, b, and c
    for a in V do
        for b in V do
            for c in V do
                # Define xi and F as the specified symbols
                xi := xi_sym;
                F := F_sym;

                # Form the differential equation by substituting the values of a, b, and c
                eq := subs({'A' = a, 'B' = b, 'C' = c}, eq_template);

                # Check the substitution
                eq_check := eval(eq);
                ### for debugging #### printf("The equation after substitution for a = %a, b = %a, c = %a is: %a\n", a, b, c, eq_check);

                # Increment the counter
                count := count + 1;

                # Solve the differential equation
                sol := dsolve(eq_check, F(xi));

                # Check if an explicit solution was found
                if type(sol, `=`) then
                    Fsol := rhs(sol);
                else
                    Fsol := "No explicit solution";
                end if;

                # Add the row to the list of rows
                rows := [op(rows), [a, b, c, Fsol]];
            end do;
        end do;
    end do;

    # Display the number of generated printf messages
    printf("Total number of printf messages generated: %d\n", count);

    # Count the number of rows (for the DataFrame)
    numrows := nops(rows);

    # Create the DataFrame with the collected rows and the correct column names
    result := DataFrame(Matrix(numrows, 4, rows), columns = ['A', 'B', 'C', F_sym(xi_sym)]);

    # Adjust the output limit to display all rows
    interface(rtablesize = numrows+10);  # Increase the limit so all rows are shown

    # Display the result
    ###printf("%A\n", result);

    return result;
end proc:

# Define the list of values for a, b, and c
V := {  0, 1/2  };  # Start with a smaller set to test

# Define the independent variable and function
xi_sym := t;
F_sym := y;

# Define the general form of the differential equation
eq_template := diff(F_sym(xi_sym), xi_sym) = 'A' + 'B'*F_sym(xi_sym) + 'C'*F_sym(xi_sym)^2;

# Call the procedure
result := Odegenerator(V, xi_sym, F_sym, eq_template);

# View the result
###result;

V := {0, 1/2}

 

xi_sym := t

 

F_sym := y

 

eq_template := diff(y(t), t) = A+B*y(t)+C*y(t)^2

 

Total number of printf messages generated: 8

 

module DataFrame () description "two-dimensional rich data container"; local columns, rows, data, binder; option object(BaseDataObject); end module

(2)

 

 

 

 


 

Download ODEgeneratorMprimesforumreactie_18-8-2024.mw


 

First 11 12 13 14 15 16 17 Last Page 13 of 57