Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Applying Math with Python - Second Edition

You're reading from  Applying Math with Python - Second Edition

Product type Book
Published in Dec 2022
Publisher Packt
ISBN-13 9781804618370
Pages 376 pages
Edition 2nd Edition
Languages
Concepts
Author (1):
Sam Morley Sam Morley
Profile icon Sam Morley

Table of Contents (13) Chapters

Preface Chapter 1: An Introduction to Basic Packages, Functions, and Concepts Chapter 2: Mathematical Plotting with Matplotlib Chapter 3: Calculus and Differential Equations Chapter 4: Working with Randomness and Probability Chapter 5: Working with Trees and Networks Chapter 6: Working with Data and Statistics Chapter 7: Using Regression and Forecasting Chapter 8: Geometric Problems Chapter 9: Finding Optimal Solutions Chapter 10: Improving Your Productivity Index Other Books You May Enjoy

Solving equations

Many mathematical problems eventually reduce to solving an equation of the form , where is a function of a single variable. Here, we try to find a value of for which the equation holds. The values of for which the equation holds are sometimes called roots of the equation. There are numerous algorithms for finding solutions to equations of this form. In this recipe, we will use the Newton-Raphson and secant methods to solve an equation of the form .

The Newton-Raphson method (Newton’s method) and the secant method are good, standard root-finding algorithms that can be applied in almost any situation. These are iterative methods that start with an approximation of the root and iteratively improve this approximation until it lies within a given tolerance.

To demonstrate these techniques, we will use the function from the Differentiating and integrating symbolically using SymPy recipe, defined by the following formula:

This is...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}