So the equation we want to solve is:
-__spaces ['f(x) = x[cubed] -a]
+[expression ['f(x) = x[cubed] -a]]
We will first solve this without using any information
about the slope or curvature of the cube root function.
both the evaluation of the function to solve,
along with its first [*and second] derivative:
-__spaces['f''(x) = 6x]
+[expression ['f''(x) = 6x]]
using information about both slope and curvature to speed convergence.
Full code of this example is at
[@../../example/root_finding_example.cpp root_finding_example.cpp],
-[endsect]
+[endsect] [/section:cbrt_eg Finding the Cubed Root With and Without Derivatives]
+
[section:lambda Using C++11 Lambda's]
Full code of this example is at
[@../../example/root_finding_example.cpp root_finding_example.cpp],
-[endsect]
+[endsect] [/section:lambda Using C++11 Lambda's]
+
[section:5th_root_eg Computing the Fifth Root]
The equation we want to solve is :
-__spaces['f](x) = ['x[super 5] -a]
+[expression ['f](x) = ['x[super 5] -a]]
If your differentiation is a little rusty
(or you are faced with an function whose complexity makes differentiation daunting),
(We could also get a reference value using __multiprecision_root).
-The 1st and 2nd derivatives of x[super 5] are:
+The 1st and 2nd derivatives of ['x[super 5]] are:
-__spaces['f]\'(x) = 5x[super 4]
+[expression ['f\'(x) = 5x[super 4]]]
-__spaces['f]\'\'(x) = 20x[super 3]
+[expression ['f\'\'(x) = 20x[super 3]]]
[root_finding_fifth_functor_2deriv]
[root_finding_fifth_2deriv]
[@../../example/root_finding_example.cpp root_finding_example.cpp] and
[@../../example/root_finding_n_example.cpp root_finding_n_example.cpp].
-[endsect]
+[endsect] [/section:5th_root_eg Computing the Fifth Root]
+
[section:multiprecision_root Root-finding using Boost.Multiprecision]
Full code of this example is at
[@../../example/root_finding_multiprecision_example.cpp root_finding_multiprecision_example.cpp].
-[endsect]
+[endsect] [/section:multiprecision_root Root-finding using Boost.Multiprecision]
[section:nth_root Generalizing to Compute the nth root]