janhardo

870 Reputation

12 Badges

11 years, 271 days
B. Ed math

MaplePrimes Activity


These are answers submitted by janhardo


Maybe too much ?
Showing a histogram plot for the 3 methods seperately is better ?
It is in build in maple ?

"maple.ini in user"

(1)

NULL

 

 

restart;
with(Student:-Calculus1):
with(plots):

f := x -> x^2;
a := -2;
b := 2;
exact := int(f(x), x = a..b);

# Compacte animatie
animate(
    n -> display(
        # Drie methodes
        RiemannSum(f(x), x = a..b, method = left, partition = trunc(n),
                  output = plot, caption = "", boxoptions = [filled = [color = "LightBlue"]]),
        RiemannSum(f(x), x = a..b, method = right, partition = trunc(n),
                  output = plot, caption = "", boxoptions = [filled = [color = "LightCoral"]]),
        RiemannSum(f(x), x = a..b, method = midpoint, partition = trunc(n),
                  output = plot, caption = "", boxoptions = [filled = [color = "LightGreen"]]),
        
        # Functie
        plot(f(x), x = a..b, color = "Black", thickness = 2),
        
        # Info
        title = typeset("Riemann Methods: n=", trunc(n),
                       ", Exact=", evalf[5](exact)),
        view = [a..b, -0.2..4.5]
    ),
    [n],
    n = 1..150,
    frames = 25,
    size = [1000, 400]
);

"maple.ini in user"

 

proc (x) options operator, arrow; x^2 end proc

 

-2

 

2

 

16/3

 

 

NULL

 

 

restart;
with(Student:-Calculus1):
with(plots):

f := x -> x^2;
a := -2;
b := 2;
exact := evalf(int(f(x), x = a..b));

# CLEAR VISUALIZATION: Three separate plots side by side
animate(
    n -> display(
        Array([
            # COLUMN 1: LEFT ENDPOINT METHOD
            display(
                RiemannSum(f(x), x = a..b, method = left, partition = trunc(n),
                          output = plot, caption = "",
                          boxoptions = [filled = [color = "Blue", transparency = 0.6]]),
                plot(f(x), x = a..b, color = "Black", thickness = 2),
                title = typeset("LEFT ENDPOINT METHOD\n",
                               "Uses: f(x₋₁₎) at LEFT of each interval\n",
                               "Approximation: ",
                               evalf[5](RiemannSum(f(x), x=a..b, method=left, partition=trunc(n)))),
                view = [a..b, -0.5..4.5]
            ),
            
            # COLUMN 2: RIGHT ENDPOINT METHOD
            display(
                RiemannSum(f(x), x = a..b, method = right, partition = trunc(n),
                          output = plot, caption = "",
                          boxoptions = [filled = [color = "Red", transparency = 0.6]]),
                plot(f(x), x = a..b, color = "Black", thickness = 2),
                title = typeset("RIGHT ENDPOINT METHOD\n",
                               "Uses: f(xᵢ) at RIGHT of each interval\n",
                               "Approximation: ",
                               evalf[5](RiemannSum(f(x), x=a..b, method=right, partition=trunc(n)))),
                view = [a..b, -0.5..4.5]
            ),
            
            # COLUMN 3: MIDPOINT METHOD
            display(
                RiemannSum(f(x), x = a..b, method = midpoint, partition = trunc(n),
                          output = plot, caption = "",
                          boxoptions = [filled = [color = "Green", transparency = 0.6]]),
                plot(f(x), x = a..b, color = "Black", thickness = 2),
                title = typeset("MIDPOINT METHOD\n",
                               "Uses: f((x₋₁₎+xᵢ)/2) at MIDDLE of each interval\n",
                               "Approximation: ",
                               evalf[5](RiemannSum(f(x), x=a..b, method=midpoint, partition=trunc(n)))),
                view = [a..b, -0.5..4.5]
            )
        ]),
        title = typeset("VISUAL COMPARISON OF RIEMANN SUM METHODS\n",
                       "f(x) = x² on [", a, ", ", b, "] | n = ", trunc(n),
                       " partitions | Δx = ", evalf[5]((b-a)/trunc(n)),
                       " | Exact integral = ", evalf[5](exact)),
        size = [1200, 450]
    ),
    [n],
    n = 1..50,
    frames = 25,
    paraminfo = false
);

"maple.ini in user"

 

proc (x) options operator, arrow; x^2 end proc

 

-2

 

2

 

5.333333333

 

 

 

 

 

 

 

 

NULL


 

Download riemann_som_mprimes_DEF_22-12-2025.mw

@Alfred_F 

THE POSSIBLE 'AHA MOMENT':
============================

Lipschitz was probably struggling with:
How do you prove convergence without assumptions about f'?

INSIGHT: "What if I REVERSE the MEAN VALUE THEOREM?
Instead of: IF f is differentiable, THEN |f(u)-f(v)| ≤ sup|f'|·|u-v|
Take as DEFINITION: |f(u)-f(v)| ≤ L·|u-v| for some L
Then I have control without needing differentiability!"

AND THEN HE SAW IT:
With this assumption, the Picard iteration becomes a
CONTRACTION in the sup-norm:
||T[y] - T[z]||_∞ ≤ L·h·||y-z||_∞
If h < 1/L, then T is a strict contraction!
→ Banach's fixed point theorem gives immediate existence and uniqueness!
 

DEEPER MATHEMATICAL INSIGHT: WHY THIS WAS BRILLIANT
========================================================================

1. THE FUNDAMENTAL PROBLEM LIPSCHITZ FACED:
------------------------------------------
In the 19th century, mathematicians knew two approaches:

A. CONSTRUCTIVE (Picard, 1890):
   y_{n+1}(t) = y₀ + ∫[t₀,t] f(s, y_n(s)) ds
   Problem: How to prove {y_n} converges without strong assumptions?

B. EXISTENCE ONLY (Cauchy, 1820s, Peano 1890):
   Using Euler polygon method + compactness (Arzelà-Ascoli)
   Shows existence BUT not uniqueness!

Lipschitz wanted: CONSTRUCTIVE method that also proves UNIQUENESS.

2. THE KEY OBSERVATION:
----------------------
Differentiability gives local linear approximation:
f(u) - f(v) = f'(ξ)(u-v) for some ξ between u and v
So: |f(u)-f(v)| = |f'(ξ)|·|u-v| ≤ sup|f'|·|u-v|

But sup|f'| might not exist (f' could be unbounded)!
Example: f(y) = y² → f'(y) = 2y → unbounded as y → ∞

Lipschitz's genius: Use the INEQUALITY as the DEFINITION!

3. THE CONCEPTUAL LEAP:
----------------------
Traditional thinking: f smooth → can approximate linearly
Lipschitz's thinking: Forget smoothness! Just assume
   |f(u)-f(v)| ≤ L·|u-v| for some constant L

This is:
• Weaker than differentiability (f can be non-differentiable!)
• Stronger than mere continuity (excludes functions like √|x|)
• Quantitatively measurable (L is a concrete number)

4. WHY THIS SOLVES THE CONVERGENCE PROBLEM:
------------------------------------------
Consider the Picard operator T[y](t) = y₀ + ∫[t₀,t] f(s,y(s)) ds

For two functions y,z:
|T[y](t) - T[z](t)| ≤ ∫[t₀,t] |f(s,y(s)) - f(s,z(s))| ds
                    ≤ L·∫[t₀,t] |y(s) - z(s)| ds  ← LIPSCHITZ!
                    ≤ L·h·max_{s} |y(s)-z(s)|
                    = L·h·||y-z||_∞

Thus: ||T[y] - T[z]||_∞ ≤ L·h·||y-z||_∞

If we choose h < 1/L, then T is a CONTRACTION!
Contraction factor: q = L·h < 1

5. BANACH'S FIXED POINT THEOREM (1922, but the idea was there!):
----------------------------------------------------------------
In a complete metric space, if T is a contraction (d(Tx,Ty) ≤ q·d(x,y), q<1),
then T has a UNIQUE fixed point x* with x* = T(x*).

Applied to our case:
• Space: C([t₀-h,t₀+h]) with sup-norm (complete!)
• Operator: T as above
• Contraction: ||T[y]-T[z]|| ≤ q·||y-z|| with q = L·h < 1
→ ∃! y* such that y* = T[y*]
→ y* satisfies y*(t) = y₀ + ∫[t₀,t] f(s,y*(s)) ds
→ Differentiate: y*'(t) = f(t,y*(t)) and y*(t₀) = y₀

6. THE HISTORICAL CONTEXT - WHY THIS WAS REVOLUTIONARY:
-------------------------------------------------------
Before Lipschitz (1876):
• Cauchy (1835): Existence via Euler polygons
• Liouville (1838): Method of successive approximations
• Peano (1890): Existence without uniqueness

Lipschitz's contribution:
1. Unified construction and proof of uniqueness
2. Identified the MINIMAL sufficient condition
3. Created a template for functional analysis

7. MODERN PERSPECTIVE - THE ABSTRACT VIEW:
-----------------------------------------
Today we see Lipschitz condition as:

A. A METRIC CONDITION:
   d_Y(f(u), f(v)) ≤ L·d_X(u,v)
   where d_X, d_Y are distances in appropriate spaces

B. A GLOBAL LINEAR BOUND:
   f doesn't grow faster than linearly
   Prevents "runaway" behavior in iterations

C. A CONTRACTION CONDITION:
   Makes the Picard operator a contraction
   Enables Banach fixed point theorem

8. WHAT'S TRULY REMARKABLE:
--------------------------
The Lipschitz condition is:

• NECESSARY for uniqueness (counterexamples exist without it)
   Example: y' = √|y|, y(0)=0 has infinitely many solutions

• SUFFICIENT for both existence AND uniqueness

• PRACTICAL to verify (often from bounded derivative)

• ROBUST (preserved under many operations)

9. THE EVEN DEEPER MATHEMATICS:
-----------------------------
The Lipschitz constant L gives:

A. CONVERGENCE RATE:
   ||y_n - y*|| ≤ (L·h)^n/(1-L·h)·||y₁ - y₀||
   Geometric convergence!

B. DOMAIN OF EXISTENCE:
   h < min(1/L, b/M) where b = vertical radius, M = bound on |f|

C. SENSITIVITY TO INITIAL CONDITIONS:
   If y,z are solutions with different initial conditions:
   |y(t)-z(t)| ≤ e^{L|t-t₀|}·|y₀-z₀|
   (Continuous dependence on initial data)

10. THE LEGACY - BEYOND ODEs:
----------------------------
Lipschitz's idea spawned:

• LIPSCHITZ MANIFOLDS in differential geometry
• LIPSCHITZ FUNCTIONS in analysis (Rademacher's theorem)
• LIPSCHITZ CONTINUITY in metric spaces
• LIPSCHITZ STABILITY in control theory
• LIPSCHITZ DOMAINS in PDE theory

========================================================================
CONCLUSION: THE ESSENCE OF LIPSCHITZ'S INSIGHT
========================================================================

Lipschitz realized that to prove convergence of Picard iterations,
you don't need LOCAL linear approximation (differentiability),
but GLOBAL linear control: |f(u)-f(v)| ≤ L·|u-v|.

This single inequality:
1. Creates a recursive bound: |y_{n+1}-y_n| ≤ L·∫|y_n-y_{n-1}|
2. Yields geometric convergence when iterated
3. Makes the Picard operator a contraction
4. Guarantees both existence AND uniqueness

It was a classic case of:
"Ask not what properties the function has,
 but what properties you NEED for the proof,
 then make those properties your definition."

This is the hallmark of great mathematics:
Identifying the MINIMAL structure needed to make a proof work,
then building a theory around that structure.

The pattern recognition of simplify falls short for this expression and must first be converted into a recognizable form for simplify via collect.
That seems like a good explanation to me.

This is working in a worksheet 

This is the secant method as a procedure for not singular elliptic curves.
I did some examples, but th eprocedure code is not yet fully functional...
Example 1 is single point and example 2 is doubling example 1 

fxy := y^2 - 2*y + 14 = 2*x^3 + 11*x^2 - 29*x - 17:
P := [3, 7];

# Test met jouw kromme
fxy := y^2 - 2*y + 14 = 2*x^3 + 11*x^2 - 29*x - 17:
P := [3, 7];

printf("=== TEST 1: POINT DOUBLING 2P ===\n");
P2 := EllipticCurveSecantMethod(fxy, x, y, P, P, -10..10, -10..15, 
                               steps = true, showplot = true);
printf("2P = (%a, %a)\n", P2[1], P2[2])


Use : m > 1 and not 3m (m= 1... n )  


Found k  with 2 ai's , but the solution to this is the interesting part

From the Maple Programming Guide, section "5.3 Constructors":
?object,ModuleCopy:

it was rather easy with ai to come up with this animation , but now the details ...:-)

1 2 3 4 5 6 7 Page 2 of 9