janhardo

700 Reputation

12 Badges

11 years, 45 days

MaplePrimes Activity


These are replies submitted by janhardo

@salim-barzani 
Explain what exactly you want to compute about an pde and whether that is a repetitive computation ? 

With odetest 

restart;
with(PDEtools):
with(DEtools):

# Define a procedure to solve the ODE and check the solution
SolveODE := proc(A, B)
    local S, Solution, Check;
    
    # Set up the differential equation
    S := diff(G(xi), xi) = G(xi)^2 + A*G(xi) + B;
    
    # Solve the ODE
    Solution := dsolve(S, G(xi));
    
    # Check if the solution satisfies the ODE
    Check := odetest(Solution, S);
    
    # Return the solution and the validation check
    return Solution, Check;
end proc:

# Example usage
# Solution and test for specific values of A and B
sol1, test1 := SolveODE(A, B);  # A = A, B = B
sol2, test2 := SolveODE(0, B); # A = 0, B = B
sol3, test3 := SolveODE(A, 0); # A = A, B = 0
sol4, test4 := SolveODE(0, 0); # A = 0, B = 0
 

"maple.ini in users"

 

G(xi) = -(1/2)*A-(1/2)*tanh((1/2)*(A^2-4*B)^(1/2)*(c__1+xi))*(A^2-4*B)^(1/2), 0

 

G(xi) = tan(B^(1/2)*(c__1+xi))*B^(1/2), 0

 

G(xi) = A/(-1+exp(-A*xi)*c__1*A), 0

 

G(xi) = 1/(-xi+c__1), 0

(1)
 

 

Download mpromes_salim_procedure_dsolve_A_B_odetest_26-10-2024.mw

restart;

with(plots):

# Define a custom `rmod` function for periodic switching
rmod := (t, n) -> frac(t * n):

# Create a function for the chessboard pattern that switches periodically
f := (t, p) -> if (floor(4 * t/Pi) + floor(4 * p/Pi)) mod 2 = 0 then 1 else NULL end if:

# Plot the black chessboard squares on the sphere
p1 := plot3d(f, 0 .. 2*Pi, 0 .. Pi, coords = spherical, scaling = constrained, 
             color = "black", grid = [200, 200], style = surface, adaptmesh = false):

# Create a white sphere to make the pattern clearly visible
p2 := sphereplot(0.999, theta = 0 .. 2*Pi, phi = 0 .. Pi, 
                 color = "white", style = surface):

# Combine both plots
plots:-display(p1, p2);

If you follow these axioms in Maple , then it is proved
1 is neutral element for multiplication
0 is neutal element for addition 

Tsol := Re(value(eval(rhs(sols), infinity = 12)))


 

On school we learned also to bring terms to one side ...:-)

ode := diff(u(x), x, x)/u(x) - diff(u(x), x)^2/u(x)^2 = x^2 - diff(u(x), x)^2/u(x)^2;

# Move all terms to one side
eq := lhs(ode) - rhs(ode);

# Simplify the result
simplified_eq := simplify(eq);

        

 

@C_R 

Indeed, the cpu load was the same  before and after hibernation.
You must not have created restore points in window 10 to revert to an earlier configuration (impractible, so )?

@C_R 
Amd ryzen 7 5700x- 8-coreprocessor +SDD +16 mb 
Cpu load about average 10 % ? or lower , with or without maple in windows 11 started  , memory 40 % , network 0 % 

Seems there is very little effect from maple on the windows 11 system 
When get things cpu hungry : graphics ? 
Procesverkenner - Sysinternals | Microsoft Learn

@C_R 
I am using Windows 11, so maybe leaving Windows 10 ?

Maybe a unnoticed download on your computer?

@dharr 

Can't the pde be written down more compactly?
This is to avoid clerical errors and to start tracing them, which is a strenuous process 

@salim-barzani 
I think the length of the equation (function rule) is not a problem to include in the table cell. 
Just like a procedure, you can write one block of code using Shift +Enter for the long equation
With F3, you create another prompt.
Of course, the code can also be hidden in the worksheet, showing only a plot with the parameter sliders ( perhaps possible per cell in the table ?). 




This is generated maple code ..hopefully it makes sense :-) 

The two intersections points seems to be outside of the polar grid (roster)? 

A vector field is drawn in the plot of the integral curve of the system of ODEs, but in fact it is a line element field to which no direction can be given.
 

First 23 24 25 26 27 28 29 Last Page 25 of 73