Incremental search for root brackets

Claude prompt

This page was generated by Claude Code from the following prompt (with additional prompting):

Make an incremental search demo for f(x) = e^x − 4√x on [0, 2] that indicates the final root intervals and candidate intervals on a plot. Add a slider for the number of candidate intervals. Give a dropdown to select from two functions; the other one should have roots that are relatively easy to miss (Chapra has an example). Also add a toggle to turn on/off plotting of the actual function, so we have an option to see just "what the computer sees".

Incremental search splits the search range \([x_\text{min}, x_\text{max}]\) into \(n\) candidate intervals of width \(\Delta x = (x_\text{max} - x_\text{min})/n\) and evaluates \(f\) at every boundary. A candidate \([x_l, x_u]\) is kept as a root bracket when \(f(x_l)\,f(x_u) < 0\), because a continuous function that changes sign must cross zero somewhere in between.

\(f(x)\) sample points candidate boundaries root brackets


  

Back to top

ASEN 3502, CU Boulder. Last built Sep 23, 2026 at 9:00 AM MDT.