t=%v

show eigenvectors

show decompositions

show eigenvalues

show vector

x

y

t

t

x0 = -1.5882352941176472
a22: 1.4
a21: 0.3
a12: 1.4
a11: 0.7
detA: round((a11 * a22) - (a12 * a21), 14)
b1: 1
b2 = -1 (slider from -5 to 5, step 0.1)
xeq: ((-((a22 * b1) - (a12 * b2)))) / detA
y0 = -9
yeq: ((-((a11 * b2) - (a21 * b1)))) / detA
x0shift: x0 - xeq
y0shift: y0 - yeq
discrim: round(a11^(2) - ((2 * a11) * a22) + ((4 * a12) * a21) + a22^(2), 14)
sqrt_discrim: sqrt(discrim)
u22_sub = If(discrim ≟ 0, If[a11 ≟ a22 ∧ a12 ≟ a21, 1], If[a12 ≟ 0 ∧ a11 / 2 - a22 / 2 - sqrt(discrim) / 2 ≟ 0, ((-a21)) / sqrt(discrim), a11 / 2 - a22 / 2 - sqrt(discrim) / 2])
u21_sub = If(discrim ≟ 0, If[a11 ≟ a22 ∧ a12 ≟ a21, 0], If[a12 ≟ 0 ∧ a11 / 2 - a22 / 2 - sqrt(discrim) / 2 ≟ 0, -1, (-a12)])
u12_sub = If(discrim ≟ 0, If[a11 ≟ a22, If[a21 ≟ 0, 0, 1], a11 / 2 - a22 / 2], If[a12 ≟ 0 ∧ a11 / 2 - a22 / 2 + sqrt(discrim) / 2 ≟ 0, a21 / sqrt(discrim), a11 / 2 - a22 / 2 + sqrt(discrim) / 2])
u11_sub = If(discrim ≟ 0, If[a11 ≟ a22, If[a21 ≟ 0, 1, 0], (-a12)], If[a12 ≟ 0 ∧ a11 / 2 - a22 / 2 + sqrt(discrim) / 2 ≟ 0, -1, (-a12)])
P0_sub = (-1.5882352941176472, -9)
xmax: 9
xmin: (-xmax)
ymax: xmax
ymin: (-ymax)
P0 = DynamicCoordinates(P0_sub, If[x(P0_sub) > xmax, xmax, If[x(P0_sub) < xmin, xmin, x(P0_sub)]], If[y(P0_sub) > ymax, ymax, If[y(P0_sub) < ymin, ymin, y(P0_sub)]])
c11r: (((-a11) * x0shift) - ((2 * a12) * y0shift) + (a22 * x0shift) + (x0shift * sqrt_discrim)) / ((2 * sqrt_discrim))
c1d: (((2 * a12) * y0shift) + (x0shift * (a11 - a22))) / 2
c12r: ((a11 * x0shift) + ((2 * a12) * y0shift) - (a22 * x0shift) + (x0shift * sqrt_discrim)) / ((2 * sqrt_discrim))
l2: a11 / 2 + a22 / 2 + sqrt(discrim) / 2
l1: a11 / 2 + a22 / 2 - sqrt(discrim) / 2
fd(x) = ((x0shift + (c1d * x)) * ℯ^((l1 * x))) + xeq
fr(x) = (c11r * ℯ^((l1 * x))) + (c12r * ℯ^((l2 * x))) + xeq
il: sqrt((-discrim)) / 2
c1c: ((-2 * il) * (((2 * a12) * y0shift) + (x0shift * (a11 - a22))) / discrim)
real_evals: discrim ≥ 0
rl: a11 / 2 + a22 / 2
fc(x) = ((c1c * sin((il * x))) * ℯ^((rl * x))) + ((x0shift * cos((il * x))) * ℯ^((rl * x))) + xeq
c2c: ((-2 * il) * (((2 * a21) * x0shift) + ((a22 - a11) * y0shift)) / discrim)
gc(x) = ((c2c * sin((il * x))) * ℯ^((rl * x))) + ((y0shift * cos((il * x))) * ℯ^((rl * x))) + yeq
c22r: (((-a11) * y0shift) + ((2 * a21) * x0shift) + (a22 * y0shift) + (y0shift * sqrt_discrim)) / ((2 * sqrt_discrim))
c21r: ((a11 * y0shift) - ((2 * a21) * x0shift) - (a22 * y0shift) + (y0shift * sqrt_discrim)) / ((2 * sqrt_discrim))
gr(x) = (c21r * ℯ^((l1 * x))) + (c22r * ℯ^((l2 * x))) + yeq
c2d: ((-y0shift) * (a11 - a22) / 2) + (x0shift * a21)
gd(x) = ((y0shift + (c2d * x)) * ℯ^((l1 * x))) + yeq
rightbufferpixels: 20
totpixelshoriz: x(Corner[2, 5])
leftbufferpixels: 35
tfinal: 1
t0: 0
u1: (If[u11_sub ≤ 0 ∧ u12_sub ≤ 0, -1, 1] * (u11_sub, u12_sub) / sqrt(u11_sub^(2) + u12_sub^(2)))
u2: (If[u21_sub ≤ 0 ∧ u22_sub ≤ 0, -1, 1] * (u21_sub, u22_sub) / sqrt(u21_sub^(2) + u22_sub^(2)))
ttopixels: (totpixelshoriz - leftbufferpixels - rightbufferpixels) / (tfinal - t0)
f = If(real_evals, If[discrim ≟ 0, fd, fr], fc)
g = If(real_evals, If[discrim ≟ 0, gd, gr], gc)
tmin: t0 - leftbufferpixels / ttopixels
tmax: tfinal + rightbufferpixels / ttopixels
tt = 1 (slider from t0 to tfinal, step 0.05)
Xvec_t: (f(tt), g(tt))
show_evecs = true
x_t: (tt, f(tt))
h: x = tt
show_a: true
show_b: true
show_c: true
show_d: true
Aequation: "\begin{align*}A = \begin{bmatrix}" + a11 + " & " + a12 + " \\ " + a21 + " & " + a22 + " \end{bmatrix}\end{align*}"
lambda2Equation: "\lambda_2 = " + (LaTeX[If[discrim ≥ 0, l2 + "", rl + "+" + il + "i"]]) + ""
lambdaCombinedEquation: "\lambda = " + (LaTeX[If[discrim > 0, l1 + (", " * l2), rl + "\pm" + il + "i"]]) + ""
u1Equation: "u_1 = " + (LaTeX[If[discrim ≥ 0, (x(u1), y(u1)), "?"]]) + ""
detu: (x(u1) * y(u2)) - (y(u1) * x(u2))
X0p1: (((x0shift * y(u2)) - (y0shift * x(u2))) / detu * u1) + (xeq, yeq)
X0p2: (((y0shift * x(u1)) - (x0shift * y(u1))) / detu * u2) + (xeq, yeq)
Xvectp2: ((((y(Xvec_t) - yeq) * x(u1)) - ((x(Xvec_t) - xeq) * y(u1))) / detu * u2) + (xeq, yeq)
Xvectp1: ((((x(Xvec_t) - xeq) * y(u2)) - ((y(Xvec_t) - yeq) * x(u2))) / detu * u1) + (xeq, yeq)
i = Segment(P0, X0p1)
j = Segment(P0, X0p2)
k = Segment(Xvec_t, Xvectp1)
l = Segment(Xvec_t, Xvectp2)
show_decomps = false
show_decompscheckbox: true
l1point = If(discrim ≥ 0, (l1, 0), (rl, il))
l2point = If(discrim ≥ 0, (l2, 0), (rl, (-il)))
m(x) = x < 0
show_evals = false
show_evalscheckbox: true
topbufferpixels: 20
totheightaxes: ((xmax - xmin) * 2)
totpixelsvert: y(Corner[2, 5])
vspacepixels: 35
xtopixels: (totpixelsvert - topbufferpixels - (1.5 * vspacepixels)) / totheightaxes
vspace: vspacepixels / xtopixels
xmaxwindow: xmax + topbufferpixels / xtopixels
ystretch: (xmax - xmin) / (ymax - ymin)
yshift: xmin - (ymax * ystretch) - vspace
tickheight: 5 / xtopixels
tickwidth: 5 / ttopixels
xfromy(x) = (x * ystretch) + yshift
yfromx(x) = (x - yshift) / ystretch
yaxis: y = xfromy(0)
e = Segment((t0, xmax), (t0 - tickwidth, xmax))
n = Segment((tfinal, xfromy(0)), (tfinal, xfromy(0) - tickheight))
p = Segment((tfinal, 0), (tfinal, (-tickheight)))
q = Segment((t0, xmin), (t0 - tickwidth, xmin))
r = Segment((t0, xfromy(ymax)), (t0 - tickwidth, xfromy(ymax)))
s = Segment((t0, xfromy(ymin)), (t0 - tickwidth, xfromy(ymin)))
xseg = Segment((t0, xmin), (t0, xmax))
yseg = Segment((t0, xfromy(ymin)), (t0, xfromy(ymax)))
textxmax0 = Text(xmax)
textxmin0 = Text(xmin)
textymax0 = Text(ymax)
textymin0 = Text(ymin)
text1: "" + textxmax0 + ""
text5: "" + textxmin0 + ""
text7: "" + textymax0 + ""
text8: "" + textymin0 + ""
P1 = Point(xseg)
P2 = Point(yseg)
y_t: (tt, xfromy(g(tt)))
show_evecscheckbox: true
text3 = Text(t0, (t0 + 2 / ttopixels, (-4 * tickheight)))
text6 = Text(t0, (t0 + 2 / ttopixels, xfromy(0) - (4 * tickheight)))
show_vector = false
show_vectorcheckbox: true
xminwindow: xmin - (xmax - xmin) - (1.5 * vspace)
trA: round(a11 + a22, 14)
equilibriumTypeInd = If(real_evals, If[detA ≟ 0, 0, If[discrim ≟ 0, If[l1 < 0, 1, 2], If[detA < 0, 3, If[trA < 0, 4, 5]]]], If[trA ≟ 0, 6, If[trA < 0, 7, 8]])
lambda2Type = If(discrim < 0, If[trA ≟ 0, "purely imaginary", If[trA < 0, "complex with a negative real part", "complex with a positive real part"]], If[detA ≟ 0 ∧ trA ≤ 0, "zero", If[l2 < 0, "negative", "positive"]])
lambda1Type = If(discrim < 0, If[trA ≟ 0, "purely imaginary", If[trA < 0, "complex with a negative real part", "complex with a positive real part"]], If[detA ≟ 0 ∧ trA ≥ 0, "zero", If[l1 < 0, "negative", "positive"]])
equilibriumType = If(equilibriumTypeInd < 4, If[equilibriumTypeInd < 2, If[equilibriumTypeInd ≟ 0, "degenerate", "a defective stable node"], If[equilibriumTypeInd ≟ 2, "a defective unstable node", "a saddle"]], If[equilibriumTypeInd < 6, If[equilibriumTypeInd ≟ 4, "a stable node", "an unstable node"], If[equilibriumTypeInd ≟ 6, "a center", If[equilibriumTypeInd ≟ 7, "a stable spiral", "an unstable spiral"]]])
frtext: If[c11r ≟ 0, If[c12r ≟ 0, "0", c12r + "e^{" + l2 + "t}"], c11r + "e^{" + l1 + "t } " + (If[c12r ≟ 0, "", If[c12r > 0, "+", ""] + c12r + "e^{" + l2 + "t}"])] + (If[xeq ≟ 0, "", If[xeq ≥ 0, "+", ""] + xeq])
fdtext: "" + (LaTeX[If[c1d ≟ 0, "", "("] + x0shift + (If[c1d ≟ 0, "", If[c1d > 0, "+", ""] + c1d + "t)"])]) + "e^{" + (LaTeX[l1]) + "t}" + (LaTeX[If[xeq ≟ 0, "", If[xeq ≥ 0, "+", ""] + xeq]]) + ""
fctext: "" + (LaTeX[c1c]) + "\sin(" + (LaTeX[il]) + "t) e^{" + (LaTeX[rl]) + "t}" + (LaTeX[If[x0shift ≥ 0, "+", ""]]) + "" + (LaTeX[x0shift]) + "\cos(" + (LaTeX[il]) + "t) e^{" + (LaTeX[rl]) + "t}" + (LaTeX[If[xeq ≟ 0, "", If[xeq ≥ 0, "+", ""] + xeq]]) + ""
ftext = If(real_evals, If[discrim ≟ 0, fdtext, frtext], fctext)
grtext: If[c21r ≟ 0, If[c22r ≟ 0, "", c22r + "e^{" + l2 + "t}"], c21r + "e^{" + l1 + "t } " + (If[c22r ≟ 0, "", If[c22r ≥ 0, "+", ""] + c22r + "e^{" + l2 + "t}"])] + (If[yeq ≟ 0, "", If[yeq ≥ 0, "+", ""] + yeq])
gdtext: "" + (LaTeX[If[c2d ≟ 0, "", "("] + y0shift + (If[c2d ≟ 0, "", If[c2d > 0, "+", ""] + c2d + "t)"])]) + "e^{" + (LaTeX[l1]) + "t}" + (LaTeX[If[yeq ≟ 0, "", If[yeq ≥ 0, "+", ""] + yeq]]) + ""
gctext: "" + (LaTeX[c2c]) + "\sin(" + (LaTeX[il]) + "t) e^{" + (LaTeX[rl]) + "t}" + (LaTeX[If[y0shift ≥ 0, "+", ""]]) + "" + (LaTeX[y0shift]) + "\cos(" + (LaTeX[il]) + "t) e^{" + (LaTeX[rl]) + "t}" + (LaTeX[If[yeq ≟ 0, "", If[yeq ≥ 0, "+", ""] + yeq]]) + ""
gtext = If(real_evals, If[discrim ≟ 0, gdtext, grtext], gctext)
solutionEquation: "\begin{align*}x(t) &= " + ftext + "\\y(t) &= " + gtext + "\end{align*}"
theSystemSub: "\diff{x}{t} &= " + (If[a11 ≟ 0, If[a12 ≟ 0, "0", a12 + "y"], a11 + "x" + (If[a12 ≟ 0, "", If[a12 > 0, "+", ""] + a12 + "y"])] + (If[b1 ≟ 0, "", If[b1 ≥ 0, "+", ""] + b1])) + "\\ \diff{y}{t} &=" + (If[a21 ≟ 0, If[a22 ≟ 0, "0", a22 + "y"], a21 + "x" + (If[a22 ≟ 0, "", If[a22 > 0, "+", ""] + a22 + "y"])] + (If[b2 ≟ 0, "", If[b2 ≥ 0, "+", ""] + b2])) + ""
theSystem: "\begin{align*}" + theSystemSub + "\end{align*}"
text2 = Text(tfinal, (tfinal - ((tfinal - t0) * 0.04), ((-tickheight) * 5)))
text4 = Text(tfinal, (tfinal - ((tfinal - t0) * 0.04), xfromy(0) - (tickheight * 5)))
s1 = CurveCartesian(f(t), g(t), t, 0, tfinal)
s1b = CurveCartesian(f((-t)), g((-t)), t, 0, tfinal)
show_decomps2: show_decomps ∧ show_evecs ∧ (discrim > 0 ∨ a12 ≟ a21)
defectivePhrase = If(l1 ≠ 0 ∧ (equilibriumTypeInd ≟ 1 ∨ equilibriumTypeInd ≟ 2), " and they are equal to each other", "")
u2Equation: "u_2=" + (LaTeX[If[discrim > 0 ∨ a12 ≟ a21, (x(u2), y(u2)), "?"]]) + ""
maxval: 2
slider_interval: 0.1
lambda1Equation: "\lambda_1 =" + (LaTeX[If[discrim ≥ 0, l1 + "", rl + "-" + il + "i"]]) + ""
initialConditionOutside: x0 > xmax ∨ x0 < xmin ∨ y0 > ymax ∨ y0 < ymin
initialConditionOutsideWarning = If(initialConditionOutside, "Initial condition is outside axes bounds.  Initial condition point on graph will not display correctly.", "")
fn(x) = If[tmin ≤ x ≤ 0, f(x)]
fp(x) = If[0 ≤ x ≤ tfinal, f(x)]
gn(x) = If[tmin ≤ x ≤ 0, xfromy(g(x))]
gp(x) = If[0 ≤ x ≤ tfinal, xfromy(g(x))]
e2 = Line((xeq, yeq), u2)
e1 = Line((xeq, yeq), u1)
XvectAsVec = Vector((xeq, yeq), Xvec_t)
initialConditionEquation: "(x(0),y(0)) = (" + x0 + "," + y0 + ")"
theSystemInitialConditions: "\begin{align*}" + (LaTeX[theSystemSub]) + "\\x(0) &=" + (LaTeX[x0]) + "\\y(0) &=" + (LaTeX[y0]) + "\end{align*}"
show_negativetime: true
xlabeldisplayed: "" + (LaTeX[xlabel]) + ""
ylabeldisplayed: "" + (LaTeX[ylabel]) + ""
xlabeldisplayed2: "" + (LaTeX[xlabel]) + ""
ylabeldisplayed2: "" + (LaTeX[ylabel]) + ""
u1_xmax = If(l1 > 0, Vector[(xeq, yeq), (xmax / 4 + xeq, (xmax / 4 * y(u1) / x(u1)) + yeq)], Vector[(xmax + xeq, (xmax * y(u1) / x(u1)) + yeq), (xmax / 4 + xeq, (xmax / 4 * y(u1) / x(u1)) + yeq)])
u1_xmin = If(l1 > 0, Vector[(xeq, yeq), (xmin / 4 + xeq, (xmin / 4 * y(u1) / x(u1)) + yeq)], Vector[(xmin + xeq, (xmin * y(u1) / x(u1)) + yeq), (xmin / 4 + xeq, (xmin / 4 * y(u1) / x(u1)) + yeq)])
u1_ymax = If(l1 > 0, Vector[(xeq, yeq), ((ymax / 4 * x(u1) / y(u1)) + xeq, ymax / 4 + yeq)], Vector[((ymax * x(u1) / y(u1)) + xeq, ymax + yeq), ((ymax / 4 * x(u1) / y(u1)) + xeq, ymax / 4 + yeq)])
u1_ymin = If(l1 > 0, Vector[(xeq, yeq), ((ymin / 4 * x(u1) / y(u1)) + xeq, ymin / 4 + yeq)], Vector[((ymin * x(u1) / y(u1)) + xeq, ymin + yeq), ((ymin / 4 * x(u1) / y(u1)) + xeq, ymin / 4 + yeq)])
u2_xmax = If(l2 > 0, Vector[(xeq, yeq), (xmax / 4 + xeq, (xmax / 4 * y(u2) / x(u2)) + yeq)], Vector[(xmax + xeq, (xmax * y(u2) / x(u2)) + yeq), (xmax / 4 + xeq, (xmax / 4 * y(u2) / x(u2)) + yeq)])
u2_xmin = If(l2 > 0, Vector[(xeq, yeq), (xmin / 4 + xeq, (xmin / 4 * y(u2) / x(u2)) + yeq)], Vector[(xmin + xeq, (xmin * y(u2) / x(u2)) + yeq), (xmin / 4 + xeq, (xmin / 4 * y(u2) / x(u2)) + yeq)])
u2_ymax = If(l2 > 0, Vector[(xeq, yeq), ((ymax / 4 * x(u2) / y(u2)) + xeq, ymax / 4 + yeq)], Vector[((ymax * x(u2) / y(u2)) + xeq, ymax + yeq), ((ymax / 4 * x(u2) / y(u2)) + xeq, ymax / 4 + yeq)])
u2_ymin = If(l2 > 0, Vector[(xeq, yeq), ((ymin / 4 * x(u2) / y(u2)) + xeq, ymin / 4 + yeq)], Vector[((ymin * x(u2) / y(u2)) + xeq, ymin + yeq), ((ymin / 4 * x(u2) / y(u2)) + xeq, ymin / 4 + yeq)])