Published
Edited
Aug 20, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// user input
B = -8
// B = -6
Insert cell
// user input
C = 12
Insert cell
avgRS = -B / 2
Insert cell
z2 = B ** 2 / 4 - C
Insert cell
isRealSol = z2 >= 0
Insert cell
z = isRealSol ? Math.sqrt(z2) : Math.sqrt(-z2)+'i'
Insert cell
R = isRealSol ? avgRS + z : avgRS + '+' + z
Insert cell
S = isRealSol ? avgRS - z : avgRS + '-' + z
Insert cell
extrema = avgRS ** 2 + B * avgRS + C
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more