I'm a professor of mathematics at the University of North Carolina Asheville. I've also done a fair amount of consulting work over the years focusing on scientific and data visualization.
I'm happy to be part of the first Observable Ambassador's cohort.
// A list of students and their assigned functions.
// Often, I prepare this externally using Sympy.
names_and_functions=[
{f:"",name:""},
{
f:"x^3+6 x^2+9 x-1",
name:"Adrienne"
},
{
f:"x^3+5 x^2+6 x-1",
name:"Audrey"
},
{
f:"x^3+x^2-2 x-1",
name:"Flippy (anonymous student)"
},
{
f:"x^3+4 x^2+3 x-1",
name:"Mark"
}
]
// Define f
f=(x)=>x**3+x**2-2*x-1
// Take a look at a graph
funplot(f,{xdomain:[-3,2],ydomain:[-8,8]})
{
// Define the Newton's method iteration function N
letN=(x)=>x-f(x)/(3*x**2+2*x-2);
// Initialize x=1, since the root is nearby
letx=1;
// Set up a list of points
letpts=[x];
// Iterate N!
// Note that we push each iterate onto the list of points
for(leti=0;i<6;i++){
x=N(x);
pts.push(x);
}
// Return the pts
returnpts;
}
import{funplot}from"@d3/funplot"
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.