]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/doc/html/math_toolkit/roots/root_finding_examples.html
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / math / doc / html / math_toolkit / roots / root_finding_examples.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Examples of Root-Finding (with and without derivatives)</title>
5 <link rel="stylesheet" href="../../math.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7 <link rel="home" href="../../index.html" title="Math Toolkit 2.5.1">
8 <link rel="up" href="../roots.html" title="Root finding">
9 <link rel="prev" href="roots_deriv.html" title="Root Finding With Derivatives: Newton-Raphson, Halley &amp; Schr&#246;der">
10 <link rel="next" href="root_finding_examples/cbrt_eg.html" title="Finding the Cubed Root With and Without Derivatives">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="roots_deriv.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../roots.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="root_finding_examples/cbrt_eg.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="math_toolkit.roots.root_finding_examples"></a><a class="link" href="root_finding_examples.html" title="Examples of Root-Finding (with and without derivatives)">Examples of
28 Root-Finding (with and without derivatives)</a>
29 </h3></div></div></div>
30 <div class="toc"><dl>
31 <dt><span class="section"><a href="root_finding_examples/cbrt_eg.html">Finding
32 the Cubed Root With and Without Derivatives</a></span></dt>
33 <dt><span class="section"><a href="root_finding_examples/lambda.html">Using
34 C++11 Lambda's</a></span></dt>
35 <dt><span class="section"><a href="root_finding_examples/5th_root_eg.html">Computing
36 the Fifth Root</a></span></dt>
37 <dt><span class="section"><a href="root_finding_examples/multiprecision_root.html">Root-finding
38 using Boost.Multiprecision</a></span></dt>
39 <dt><span class="section"><a href="root_finding_examples/nth_root.html">Generalizing
40 to Compute the nth root</a></span></dt>
41 <dt><span class="section"><a href="root_finding_examples/elliptic_eg.html">A
42 More complex example - Inverting the Elliptic Integrals</a></span></dt>
43 </dl></div>
44 <p>
45 The examples demonstrate how to use the various tools for <a href="http://en.wikipedia.org/wiki/Root-finding_algorithm" target="_top">root
46 finding</a>.
47 </p>
48 <p>
49 We start with the simple cube root function <code class="computeroutput"><span class="identifier">cbrt</span></code>
50 ( C++ standard function name <a href="http://en.cppreference.com/w/cpp/numeric/math/cbrt" target="_top">cbrt</a>)
51 showing root finding <a class="link" href="root_finding_examples/cbrt_eg.html#math_toolkit.roots.root_finding_examples.cbrt_eg.cbrt_no_derivatives">without
52 derivatives</a>.
53 </p>
54 <p>
55 We then show how use of derivatives can improve the speed of convergence.
56 </p>
57 <p>
58 (But these examples are only a demonstration and do not try to make the ultimate
59 improvements of an 'industrial-strength' implementation, for example, of
60 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cbrt</span></code>, mainly by using a better computed
61 initial 'guess' at <a href="../../../../../../libs/math/include/boost/math/special_functions/cbrt.hpp" target="_top">cbrt.hpp</a>).
62 </p>
63 <p>
64 Then we show how a higher root (<a class="link" href="root_finding_examples/5th_root_eg.html" title="Computing the Fifth Root">fifth
65 root</a>) <sup>5</sup>&#8730; can be computed, and in <a href="../../../../example/root_finding_n_example.cpp" target="_top">root_finding_n_example.cpp</a>
66 a generic method for the <a class="link" href="root_finding_examples/nth_root.html" title="Generalizing to Compute the nth root">nth
67 root</a> that constructs the derivatives at compile-time.
68 </p>
69 <p>
70 These methods should be applicable to other functions that can be differentiated
71 easily.
72 </p>
73 </div>
74 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
75 <td align="left"></td>
76 <td align="right"><div class="copyright-footer">Copyright &#169; 2006-2010, 2012-2014 Nikhar Agrawal,
77 Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
78 Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R&#229;de, Gautam Sewani,
79 Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p>
80 Distributed under the Boost Software License, Version 1.0. (See accompanying
81 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
82 </p>
83 </div></td>
84 </tr></table>
85 <hr>
86 <div class="spirit-nav">
87 <a accesskey="p" href="roots_deriv.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../roots.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="root_finding_examples/cbrt_eg.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
88 </div>
89 </body>
90 </html>