x

y

%y

%y

%y

dx: 0.5
P1_sub = (1.4819526627218909, 2.448390748308335)
xmin = -0.9263313609467456
xmax = 4.634615384615379
xscale: xmax - xmin
threshold = 0.03
threshold_x: (threshold * xscale)
ymax = 20.70517725303556
ymin = -5.958222572473035
P1 = DynamicCoordinates(P1_sub, If[x(P1_sub)  <  0, 0, If[x(P1_sub) > xmax, xmax, If[abs((round(x(P1_sub) / dx) * dx) - x(P1_sub))  <  threshold_x / 2, (round(x(P1_sub) / dx) * dx), x(P1_sub)]]], If[y(P1_sub)  <  ymin, ymin, If[y(P1_sub) > ymax, ymax, y(P1_sub)]])
ncriticalpoints: 2
P2_sub = (2.5109467455621264, 2.78805189258233)
P2 = DynamicCoordinates(P2_sub, If[x(P2_sub)  <  0, 0, If[x(P2_sub) > xmax, xmax, If[abs((round(x(P2_sub) / dx) * dx) - x(P2_sub))  <  threshold_x / 2, (round(x(P2_sub) / dx) * dx), x(P2_sub)]]], If[y(P2_sub)  <  ymin, ymin, If[y(P2_sub) > ymax, ymax, y(P2_sub)]])
Pright = If(x(P1)  <  x(P2), P2, P1)
Pleft = If(x(P1)  <  x(P2), P1, P2)
criticalpoint1: 1.5
n_c = 0 (slider from 0 to 2, step 1)
criticalpoint2: 2.5
c0: 0.1
yscale: ymax - ymin
LL = Corner(1)
UR = Corner(3)
threshold_y: (threshold * yscale)
xlabeldisplayed: "" + (LaTeX[xlabel]) + ""
ylabeldisplayed: "" + (LaTeX[ylabel]) + ""
yP1P02diff = -4.585425447698932
yP2P02diff = -4.245764303424937
P02_sub = (0, 7.033816196007267)
xP1: x(P1)
xP2: x(P2)
yP1: y(P1)
yP2: y(P2)
c2: (6 * (y(P2) - y(P1)) / (x(P1) - x(P2))^(3))
d2: y(P1) + (c2 * x(P1)^(3) / 6) - ((c2 * x(P1)^(2)) * x(P2) / 2)
f2(x) = If[0 ≤ x ≤ xmax, (c2 / 3 * x^(3)) - ((c2 / 2 * (xP1 + xP2)) * x^(2)) + (((c2 * xP1) * xP2) * x) + d2]
y0: 5
P02 = DynamicCoordinates(P02_sub, 0, If[abs(y(P02_sub) - y0)  <  threshold_y, y0, If[y(P02_sub)  <  ymin, ymin, If[y(P02_sub) > ymax, ymax, y(P02_sub)]]])
cp2correct: (ncriticalpoints ≥ 2) ∧ ((n_c ≥ 1) ∧ (abs(x(Pleft) - criticalpoint2)  <  threshold_x / 2) ∨ (n_c ≥ 2) ∧ (abs(x(Pright) - criticalpoint2)  <  threshold_x / 2))
derivsign1: 1
derivsign2: -1
cp1correct: (ncriticalpoints ≥ 1) ∧ ((n_c ≥ 1) ∧ (abs(x(Pleft) - criticalpoint1)  <  threshold_x / 2) ∨ (n_c ≥ 2) ∧ (abs(x(Pright) - criticalpoint1)  <  threshold_x / 2))
derivsign3: 1
a1: (y(Pright) - y(Pleft)) / (x(Pright) - x(Pleft))^(2)
P01_sub = (0, 3.2126283229248234)
P01 = DynamicCoordinates(P01_sub, 0, If[abs(y(P01_sub) - y0)  <  threshold_y, y0, If[y(P01_sub)  <  ymin, ymin, If[y(P01_sub) > ymax, ymax, y(P01_sub)]]])
yP1P01diff = -0.7642375746164882
yP2P01diff = -0.42457643034249326
a0: (y(P1) - y(P2)) / (sqrt(x(P1) + c0) - sqrt(x(P2) + c0))
f1(x) = If[0 ≤ x ≤ xmax, (a1 * (x - x(Pleft))^(2)) + y(Pleft)]
b0: y(P1) - (a0 * sqrt(x(P1) + c0))
P00_sub = (0, 1.521215734380835)
P00 = DynamicCoordinates(P00_sub, 0, If[abs(y(P00_sub) - y0)  <  threshold_y, y0, If[y(P00_sub)  <  ymin, ymin, If[y(P00_sub) > ymax, ymax, y(P00_sub)]]])
f0(x) = If[0 ≤ x ≤ xmax, (a0 * sqrt(x + c0)) + b0]
yP1P00diff = 0.9271750139275001
yP2P00diff = 1.266836158201495
yP0 = If(n_c ≟ 0, y(P00), If[n_c ≟ 1, y(P01), y(P02)])
initialconditioncorrect: yP0 ≟ y0
derivsign1correct: ((ncriticalpoints ≥ 1) ∧ cp1correct ∨ ncriticalpoints ≟ 0 ∧ n_c ≟ 0) ∧ (((y(Pleft) - yP0) * derivsign1) > 0)
derivsign2correct: cp1correct ∧ ((ncriticalpoints ≥ 2) ∧ cp2correct ∨ ncriticalpoints ≟ 1 ∧ n_c ≟ 1) ∧ (((y(Pright) - y(Pleft)) * derivsign2) > 0)
derivsign3correct: cp2correct ∧ ncriticalpoints ≟ 2 ∧ n_c ≟ 2 ∧ (((f2(xmax) - y(Pright)) * derivsign3) > 0)
criticalpointscorrect = First({If[cp1correct, 1, 0], If[cp2correct, 1, 0]}, ncriticalpoints)
derivsignscorrect = First({If[derivsign1correct, 1, 0], If[derivsign2correct, 1, 0], If[derivsign3correct, 1, 0]}, ncriticalpoints + 1)