janhardo

1007 Reputation

13 Badges

12 years, 107 days
B. Ed math

MaplePrimes Activity


These are answers submitted by janhardo

Apparently, the LLM model is simply too small to be able to reason this out?

I used the geom3d package 

restart:
with(geom3d):

# Twee vlakken
plane(P1, 2*x-y+z=3, [x,y,z]): plane(P2, x+2*y-z=-1, [x,y,z]):

# Punten op P1
point(A, 1, 0, 1): point(B, 0, 0, 3):

# Punten op P2
point(C, 0, 0, 1): point(E, 1, 0, 2):

draw([P1(color=blue,transparency=0.35,style=surface),
      P2(color=green,transparency=0.35,style=surface),
      A(color=red,symbol=solidsphere,symbolsize=18),
      B(color=red,symbol=solidsphere,symbolsize=18),
      C(color=red,symbol=solidsphere,symbolsize=18),
      E(color=red,symbol=solidsphere,symbolsize=18)],
      view=[-4..4,-4..4,-4..6],axes=boxed,labels=[x,y,z],
      scaling=constrained,orientation=[60,65]);

It's complicated to make a Geom3D package completely easy to use.
I've asked for outside help to point me in the right direction.

  The integral outcome

 for 0< a <Pi

restart:
with(codegen):

F := proc(x,y)
    x*y^2
end proc:

G_forward := GRADIENT(F, mode=forward):

G_forward;
                           G_forward


G_forward(2,3);
                             9, 12

 

foo := proc(params)
local b,c,d;

b := rhs(params[1]);
c := rhs(params[2]);
d := rhs(params[3]);

print(b,c,d);

end proc;

foo([b = 2, c = 3, d = 4]);
foo([b = 2, c = 3, d = 4]);
                            2, 3, 4

                            2, 3, 4

Once the procedure has finished, these local variables are no longer in use.
No global assignments were made.

Therefore, the second call is exactly the same as the first:

 

in this format : as fiirst order recurrence equation

 Alfred_F 590
After series option in dsolve  : order= 10 as example 

restart;

infolevel[dsolve] := 5:

ode := (1+f(x))*diff(f(x),x$2)=1+x:
ics := {f(0)=1,D(f)(0)=0}:

T := time():

sol := dsolve(ics union {ode}, f(x));

time()-T;


Does the AI in Maple itself provide better answers than when using AI outside of Maple?

I've been tinkering with the tensor a bit


 

experiment with different conditions for heated rod ( easy experiment, because there can be a lot more involved)   )

heat_pde_procedure_mprimes_16-7-2026.mw

use display command with ; 
The code was otherwise to large for uploading to the mprime server 
 

> 

 

 

 
> 

restart:
with(plots):
with(plottools):

interface(imaginaryunit = J):

printf("\n"):
printf("=============================================================\n"):
printf("      FARADAY-LENZ-LORENTZ: DIDACTIC 3D SIMULATION\n"):
printf("=============================================================\n\n"):

printf("External magnetic field:\n"):
printf("   black arrows point downward: B_ext = -B k\n\n"):

printf("Induced magnetic field:\n"):
printf("   magenta arrows point upward: B_ind = +B_ind k\n\n"):

printf("This shows Lenz's law visually:\n"):
printf("the induced magnetic field opposes the increasing external flux.\n\n"):

printf("Blue rails       = parabolic conducting rails\n"):
printf("Red rod          = moving conducting rod\n"):
printf("Cyan surface     = enclosed flux area\n"):
printf("Black arrows     = external magnetic field downward\n"):
printf("Magenta arrows   = induced counter-field upward\n"):
printf("Yellow arrows    = induced current direction\n"):
printf("Green arrow      = Lorentz force on the rod\n\n"):

printf("=============================================================\n\n"):


# ============================================================
# 1. Parameters
# ============================================================

ParmValues := 0.5, 0.5, 1, 1, 2:

# B    = magnetic field strength
# r    = resistance per unit length
# m    = rod mass
# x__0 = initial position
# v__0 = initial velocity


# ============================================================
# 2. Geometry
# ============================================================

T := x -> (4/3)*x^(3/2):


# ============================================================
# 3. Equation of motion
# ============================================================

ode :=
    m*diff(x(t), t) + B^2*T(x(t))/r
    =
    m*v__0 + B^2*T(x__0)/r:

ics := x(0) = x__0:


# ============================================================
# 4. Numerical solution
# ============================================================

Sol := dsolve(
    {ode, ics},
    numeric,
    parameters = [B, r, m, x__0, v__0]
):

Sol(parameters = [ParmValues]):

B, r, m, x__0, v__0 := ParmValues:


# ============================================================
# 5. Clear external magnetic field arrows
# ============================================================

# Black arrows:
# start high, end low
# direction = downward = -z direction

ExternalBArrow := proc(a, b)
    return arrow(
        [a, b, 1.80],
        [a, b, 0.35],
        0.09,
        0.28,
        0.10,
        color = black
    ):
end proc:

DispExternalB := display(
    seq(
        seq(
            ExternalBArrow(a, b),
            a = 0 .. 5, 0.75
        ),
        b = -3.5 .. 3.5, 0.75
    )
):


# ============================================================
# 6. Clear induced magnetic counter-field arrows
# ============================================================

# Magenta arrows:
# start low, end high
# direction = upward = +z direction
#
# Their height depends on the induced current I.

InducedBArrow := proc(a, b, h)
    return arrow(
        [a, b, 0.05],
        [a, b, 0.05 + h],
        0.08,
        0.25,
        0.09,
        color = magenta
    ):
end proc:


# ============================================================
# 7. Rails
# ============================================================

RailTop := spacecurve(
    [s, sqrt(s), 0],
    s = 0 .. 5,
    color = blue,
    thickness = 6
):

RailBottom := spacecurve(
    [s, -sqrt(s), 0],
    s = 0 .. 5,
    color = blue,
    thickness = 6
):

DispWire := display([RailTop, RailBottom]):


# ============================================================
# 8. Animation loop
# ============================================================

i := 0:

for tau from 0 by 0.025 to 4 do

    vals := Sol(tau):

    X := rhs(vals[2]):

    V :=
        (
            m*v__0
            + B^2*T(x__0)/r
            - B^2*T(X)/r
        )/m:

    L := 2*sqrt(X):

    DiffT := L*V:

    Flux := B*T(X):

    EMF := B*DiffT:

    R := r*L:

    I := EMF/R:

    LorentzForce := I*B*L:

    Accel := -LorentzForce/m:

    JoulePower := I^2*R:

    InducedHeight := min(1.25, 0.35 + 0.70*abs(I)):

    Rod := spacecurve(
        [X, u, 0],
        u = -sqrt(X) .. sqrt(X),
        color = red,
        thickness = 9
    ):

    AreaPatch := plot3d(
        [s, q*sqrt(s), 0],
        s = 0 .. X,
        q = -1 .. 1,
        color = cyan,
        transparency = 0.65
    ):

    # Induced field only inside the enclosed loop
    DispInducedB := display(
        seq(
            seq(
                InducedBArrow(s, q*sqrt(s), InducedHeight),
                s = 0.30 .. X, 0.65
            ),
            q = -0.70 .. 0.70, 0.35
        )
    ):

    # Current direction:
    # for external B downward and increasing flux,
    # induced current is counterclockwise when viewed from +z.

    CurrentBottom := arrow(
        [0.20*X, -sqrt(0.20*X), 0.18],
        [0.60*X, -sqrt(0.60*X), 0.18],
        0.09,
        0.28,
        0.10,
        color = yellow
    ):

    CurrentRod := arrow(
        [X, -0.65*sqrt(X), 0.18],
        [X,  0.65*sqrt(X), 0.18],
        0.09,
        0.28,
        0.10,
        color = yellow
    ):

    CurrentTop := arrow(
        [0.85*X, sqrt(0.85*X), 0.18],
        [0.45*X, sqrt(0.45*X), 0.18],
        0.09,
        0.28,
        0.10,
        color = yellow
    ):

    DispCurrent := display(
        [CurrentBottom, CurrentRod, CurrentTop]
    ):

    # Lorentz force opposes motion, therefore points left
    ForceArrow := arrow(
        [X, 0, 0.55],
        [X - min(1.20, 0.35 + 0.35*abs(LorentzForce)), 0, 0.55],
        0.10,
        0.30,
        0.11,
        color = green
    ):

    i := i + 1:

    Disp[i] := display(
        [
            DispExternalB,
            DispInducedB,
            DispWire,
            AreaPatch,
            Rod,
            DispCurrent,
            ForceArrow
        ],
        axes = normal,
        labels = ["x", "y", "z"],
        scaling = constrained,
        orientation = [60, 68],
        view = [0 .. 5, -3.8 .. 3.8, -0.2 .. 2.0],
        size = [1100, 850],
        caption = typeset(
            "BLACK: B_ext downward  |  MAGENTA: B_ind upward  |  t=%1, x=%2, v=%3, EMF=%4, I=%5, F_L=%6",
            evalf(tau, 3),
            evalf(X, 4),
            evalf(V, 4),
            evalf(EMF, 4),
            evalf(I, 4),
            evalf(LorentzForce, 4)
        ),
        captionfont = [Courier, bold, 14]
    ):

end do:


# ============================================================
# 9. Display larger animation
# ============================================================

display(
    seq(Disp[j], j = 1 .. i),
    insequence,
    axes = normal,
    labels = ["x", "y", "z"],
    scaling = constrained,
    orientation = [60, 68],
    size = [1100, 850],
    title = typeset(
        "Lenz's law: induced magenta field points opposite to increasing external black flux"
    ),
    titlefont = [Courier, bold, 16]
):


=============================================================
      FARADAY-LENZ-LORENTZ: DIDACTIC 3D SIMULATION
=============================================================

External magnetic field:
   black arrows point downward: B_ext = -B k

Induced magnetic field:
   magenta arrows point upward: B_ind = +B_ind k

This shows Lenz's law visually:
the induced magnetic field opposes the increasing external flux.

Blue rails       = parabolic conducting rails
Red rod          = moving conducting rod
Cyan surface     = enclosed flux area
Black arrows     = external magnetic field downward
Magenta arrows   = induced counter-field upward
Yellow arrows    = induced current direction
Green arrow      = Lorentz force on the rod

=============================================================

 

 
> 

 

Download conducting_rod_in_magnetisch_veld_mprimesVersie_A_8-7-2026.mw

@KIRAN SAJJAN 
no shooting method is used

 

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