summaryrefslogtreecommitdiff
path: root/Homework/math4610/notes/Oct-27.org
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-07-02 11:55:17 -0700
committerElizabeth Alexander Hunt <me@liz.coffee>2026-07-02 11:55:17 -0700
commit6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6 (patch)
treeed97e39ec77c5231ffd2c394493e68d00ddac5a4 /Homework/math4610/notes/Oct-27.org
downloadmisc-undergrad-6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6.tar.gz
misc-undergrad-6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6.zip
Diffstat (limited to 'Homework/math4610/notes/Oct-27.org')
-rw-r--r--Homework/math4610/notes/Oct-27.org26
1 files changed, 26 insertions, 0 deletions
diff --git a/Homework/math4610/notes/Oct-27.org b/Homework/math4610/notes/Oct-27.org
new file mode 100644
index 0000000..6d23576
--- /dev/null
+++ b/Homework/math4610/notes/Oct-27.org
@@ -0,0 +1,26 @@
+Use a bisection criterion for a start
+
+Hybrid Method: combine Bisection and Higher Order Method:
+- Newton's Method
+- Secant Method (Newton's method with secant approx.)
+
+
+#+BEGIN_SRC c
+fa = f(a)
+fb = f(b)
+if (fa * fb >= 0) return
+
+error = 10 * tol
+iter = 0
+
+while (error > tol && iter < maxiter) {
+x0 = 0.5 * (a + b)
+x1 = x0 - f(x0) / f'(x0)
+if (abs(x1 - x0) > 0.5 * (b - a)) {
+// do bisection
+} else{
+// do newton's method
+}
+}
+#+END_SRC
+