Applying Math with Python


Book Description

Discover easy-to-follow solutions and techniques to help you to implement applied mathematical concepts such as probability, calculus, and equations using Python's numeric and scientific libraries Key FeaturesCompute complex mathematical problems using programming logic with the help of step-by-step recipesLearn how to utilize Python's libraries for computation, mathematical modeling, and statisticsDiscover simple yet effective techniques for solving mathematical equations and apply them in real-world statisticsBook Description Python, one of the world's most popular programming languages, has a number of powerful packages to help you tackle complex mathematical problems in a simple and efficient way. These core capabilities help programmers pave the way for building exciting applications in various domains, such as machine learning and data science, using knowledge in the computational mathematics domain. The book teaches you how to solve problems faced in a wide variety of mathematical fields, including calculus, probability, statistics and data science, graph theory, optimization, and geometry. You'll start by developing core skills and learning about packages covered in Python's scientific stack, including NumPy, SciPy, and Matplotlib. As you advance, you'll get to grips with more advanced topics of calculus, probability, and networks (graph theory). After you gain a solid understanding of these topics, you'll discover Python's applications in data science and statistics, forecasting, geometry, and optimization. The final chapters will take you through a collection of miscellaneous problems, including working with specific data formats and accelerating code. By the end of this book, you'll have an arsenal of practical coding solutions that can be used and modified to solve a wide range of practical problems in computational mathematics and data science. What you will learnGet familiar with basic packages, tools, and libraries in Python for solving mathematical problemsExplore various techniques that will help you to solve computational mathematical problemsUnderstand the core concepts of applied mathematics and how you can apply them in computer scienceDiscover how to choose the most suitable package, tool, or technique to solve a certain problemImplement basic mathematical plotting, change plot styles, and add labels to the plots using MatplotlibGet to grips with probability theory with the Bayesian inference and Markov Chain Monte Carlo (MCMC) methodsWho this book is for This book is for professional programmers and students looking to solve mathematical problems computationally using Python. Advanced mathematics knowledge is not a requirement, but a basic knowledge of mathematics will help you to get the most out of this book. The book assumes familiarity with Python concepts of data structures.




Doing Math with Python


Book Description

Doing Math with Python shows you how to use Python to delve into high school–level math topics like statistics, geometry, probability, and calculus. You’ll start with simple projects, like a factoring program and a quadratic-equation solver, and then create more complex projects once you’ve gotten the hang of things. Along the way, you’ll discover new ways to explore math and gain valuable programming skills that you’ll use throughout your study of math and computer science. Learn how to: –Describe your data with statistics, and visualize it with line graphs, bar charts, and scatter plots –Explore set theory and probability with programs for coin flips, dicing, and other games of chance –Solve algebra problems using Python’s symbolic math functions –Draw geometric shapes and explore fractals like the Barnsley fern, the Sierpinski triangle, and the Mandelbrot set –Write programs to find derivatives and integrate functions Creative coding challenges and applied examples help you see how you can put your new math and coding skills into practice. You’ll write an inequality solver, plot gravity’s effect on how far a bullet will travel, shuffle a deck of cards, estimate the area of a circle by throwing 100,000 "darts" at a board, explore the relationship between the Fibonacci sequence and the golden ratio, and more. Whether you’re interested in math but have yet to dip into programming or you’re a teacher looking to bring programming into the classroom, you’ll find that Python makes programming easy and practical. Let Python handle the grunt work while you focus on the math. Uses Python 3




The Statistics and Calculus with Python Workshop


Book Description

With examples and activities that help you achieve real results, applying calculus and statistical methods relevant to advanced data science has never been so easy Key FeaturesDiscover how most programmers use the main Python libraries when performing statistics with PythonUse descriptive statistics and visualizations to answer business and scientific questionsSolve complicated calculus problems, such as arc length and solids of revolution using derivatives and integralsBook Description Are you looking to start developing artificial intelligence applications? Do you need a refresher on key mathematical concepts? Full of engaging practical exercises, The Statistics and Calculus with Python Workshop will show you how to apply your understanding of advanced mathematics in the context of Python. The book begins by giving you a high-level overview of the libraries you'll use while performing statistics with Python. As you progress, you'll perform various mathematical tasks using the Python programming language, such as solving algebraic functions with Python starting with basic functions, and then working through transformations and solving equations. Later chapters in the book will cover statistics and calculus concepts and how to use them to solve problems and gain useful insights. Finally, you'll study differential equations with an emphasis on numerical methods and learn about algorithms that directly calculate values of functions. By the end of this book, you'll have learned how to apply essential statistics and calculus concepts to develop robust Python applications that solve business challenges. What you will learnGet to grips with the fundamental mathematical functions in PythonPerform calculations on tabular datasets using pandasUnderstand the differences between polynomials, rational functions, exponential functions, and trigonometric functionsUse algebra techniques for solving systems of equationsSolve real-world problems with probabilitySolve optimization problems with derivatives and integralsWho this book is for If you are a Python programmer who wants to develop intelligent solutions that solve challenging business problems, then this book is for you. To better grasp the concepts explained in this book, you must have a thorough understanding of advanced mathematical concepts, such as Markov chains, Euler's formula, and Runge-Kutta methods as the book only explains how these techniques and concepts can be implemented in Python.




Math for Programmers


Book Description

In Math for Programmers you’ll explore important mathematical concepts through hands-on coding. Filled with graphics and more than 300 exercises and mini-projects, this book unlocks the door to interesting–and lucrative!–careers in some of today’s hottest fields. As you tackle the basics of linear algebra, calculus, and machine learning, you’ll master the key Python libraries used to turn them into real-world software applications. Summary To score a job in data science, machine learning, computer graphics, and cryptography, you need to bring strong math skills to the party. Math for Programmers teaches the math you need for these hot careers, concentrating on what you need to know as a developer. Filled with lots of helpful graphics and more than 200 exercises and mini-projects, this book unlocks the door to interesting–and lucrative!–careers in some of today’s hottest programming fields. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the technology Skip the mathematical jargon: This one-of-a-kind book uses Python to teach the math you need to build games, simulations, 3D graphics, and machine learning algorithms. Discover how algebra and calculus come alive when you see them in code! About the book In Math for Programmers you’ll explore important mathematical concepts through hands-on coding. Filled with graphics and more than 300 exercises and mini-projects, this book unlocks the door to interesting–and lucrative!–careers in some of today’s hottest fields. As you tackle the basics of linear algebra, calculus, and machine learning, you’ll master the key Python libraries used to turn them into real-world software applications. What's inside Vector geometry for computer graphics Matrices and linear transformations Core concepts from calculus Simulation and optimization Image and audio processing Machine learning algorithms for regression and classification About the reader For programmers with basic skills in algebra. About the author Paul Orland is a programmer, software entrepreneur, and math enthusiast. He is co-founder of Tachyus, a start-up building predictive analytics software for the energy industry. You can find him online at www.paulor.land. Table of Contents 1 Learning math with code PART I - VECTORS AND GRAPHICS 2 Drawing with 2D vectors 3 Ascending to the 3D world 4 Transforming vectors and graphics 5 Computing transformations with matrices 6 Generalizing to higher dimensions 7 Solving systems of linear equations PART 2 - CALCULUS AND PHYSICAL SIMULATION 8 Understanding rates of change 9 Simulating moving objects 10 Working with symbolic expressions 11 Simulating force fields 12 Optimizing a physical system 13 Analyzing sound waves with a Fourier series PART 3 - MACHINE LEARNING APPLICATIONS 14 Fitting functions to data 15 Classifying data with logistic regression 16 Training neural networks




Foundations of Applied Mathematics, Volume I


Book Description

This book provides the essential foundations of both linear and nonlinear analysis necessary for understanding and working in twenty-first century applied and computational mathematics. In addition to the standard topics, this text includes several key concepts of modern applied mathematical analysis that should be, but are not typically, included in advanced undergraduate and beginning graduate mathematics curricula. This material is the introductory foundation upon which algorithm analysis, optimization, probability, statistics, differential equations, machine learning, and control theory are built. When used in concert with the free supplemental lab materials, this text teaches students both the theory and the computational practice of modern mathematical analysis. Foundations of Applied Mathematics, Volume 1: Mathematical Analysis includes several key topics not usually treated in courses at this level, such as uniform contraction mappings, the continuous linear extension theorem, Daniell?Lebesgue integration, resolvents, spectral resolution theory, and pseudospectra. Ideas are developed in a mathematically rigorous way and students are provided with powerful tools and beautiful ideas that yield a number of nice proofs, all of which contribute to a deep understanding of advanced analysis and linear algebra. Carefully thought out exercises and examples are built on each other to reinforce and retain concepts and ideas and to achieve greater depth. Associated lab materials are available that expose students to applications and numerical computation and reinforce the theoretical ideas taught in the text. The text and labs combine to make students technically proficient and to answer the age-old question, "When am I going to use this?




A Primer on Scientific Programming with Python


Book Description

The book serves as a first introduction to computer programming of scientific applications, using the high-level Python language. The exposition is example and problem-oriented, where the applications are taken from mathematics, numerical calculus, statistics, physics, biology and finance. The book teaches "Matlab-style" and procedural programming as well as object-oriented programming. High school mathematics is a required background and it is advantageous to study classical and numerical one-variable calculus in parallel with reading this book. Besides learning how to program computers, the reader will also learn how to solve mathematical problems, arising in various branches of science and engineering, with the aid of numerical methods and programming. By blending programming, mathematics and scientific applications, the book lays a solid foundation for practicing computational science. From the reviews: Langtangen ... does an excellent job of introducing programming as a set of skills in problem solving. He guides the reader into thinking properly about producing program logic and data structures for modeling real-world problems using objects and functions and embracing the object-oriented paradigm. ... Summing Up: Highly recommended. F. H. Wild III, Choice, Vol. 47 (8), April 2010 Those of us who have learned scientific programming in Python ‘on the streets’ could be a little jealous of students who have the opportunity to take a course out of Langtangen’s Primer.” John D. Cook, The Mathematical Association of America, September 2011 This book goes through Python in particular, and programming in general, via tasks that scientists will likely perform. It contains valuable information for students new to scientific computing and would be the perfect bridge between an introduction to programming and an advanced course on numerical methods or computational science. Alex Small, IEEE, CiSE Vol. 14 (2), March /April 2012 “This fourth edition is a wonderful, inclusive textbook that covers pretty much everything one needs to know to go from zero to fairly sophisticated scientific programming in Python...” Joan Horvath, Computing Reviews, March 2015




Python for Scientists


Book Description

Scientific Python is taught from scratch in this book via copious, downloadable, useful and adaptable code snippets. Everything the working scientist needs to know is covered, quickly providing researchers and research students with the skills to start using Python effectively.




The Discrete Math Workbook


Book Description

This practically-focused study guide introduces the fundamentals of discrete mathematics through an extensive set of classroom-tested problems. Each chapter presents a concise introduction to the relevant theory, followed by a detailed account of common challenges and methods for overcoming these. The reader is then encouraged to practice solving such problems for themselves, by tackling a varied selection of questions and assignments of different levels of complexity. This updated second edition now covers the design and analysis of algorithms using Python, and features more than 50 new problems, complete with solutions. Topics and features: provides a substantial collection of problems and examples of varying levels of difficulty, suitable for both laboratory practical training and self-study; offers detailed solutions to each problem, applying commonly-used methods and computational schemes; introduces the fundamentals of mathematical logic, the theory of algorithms, Boolean algebra, graph theory, sets, relations, functions, and combinatorics; presents more advanced material on the design and analysis of algorithms, including Turing machines, asymptotic analysis, and parallel algorithms; includes reference lists of trigonometric and finite summation formulae in an appendix, together with basic rules for differential and integral calculus. This hands-on workbook is an invaluable resource for undergraduate students of computer science, informatics, and electronic engineering. Suitable for use in a one- or two-semester course on discrete mathematics, the text emphasizes the skills required to develop and implement an algorithm in a specific programming language.




Practical Numerical and Scientific Computing with MATLAB® and Python


Book Description

Practical Numerical and Scientific Computing with MATLAB® and Python concentrates on the practical aspects of numerical analysis and linear and non-linear programming. It discusses the methods for solving different types of mathematical problems using MATLAB and Python. Although the book focuses on the approximation problem rather than on error analysis of mathematical problems, it provides practical ways to calculate errors. The book is divided into three parts, covering topics in numerical linear algebra, methods of interpolation, numerical differentiation and integration, solutions of differential equations, linear and non-linear programming problems, and optimal control problems. This book has the following advantages: It adopts the programming languages, MATLAB and Python, which are widely used among academics, scientists, and engineers, for ease of use and contain many libraries covering many scientific and engineering fields. It contains topics that are rarely found in other numerical analysis books, such as ill-conditioned linear systems and methods of regularization to stabilize their solutions, nonstandard finite differences methods for solutions of ordinary differential equations, and the computations of the optimal controls. It provides a practical explanation of how to apply these topics using MATLAB and Python. It discusses software libraries to solve mathematical problems, such as software Gekko, pulp, and pyomo. These libraries use Python for solutions to differential equations and static and dynamic optimization problems. Most programs in the book can be applied in versions prior to MATLAB 2017b and Python 3.7.4 without the need to modify these programs. This book is aimed at newcomers and middle-level students, as well as members of the scientific community who are interested in solving math problems using MATLAB or Python.




Practical Discrete Mathematics


Book Description

A practical guide simplifying discrete math for curious minds and demonstrating its application in solving problems related to software development, computer algorithms, and data science Key FeaturesApply the math of countable objects to practical problems in computer scienceExplore modern Python libraries such as scikit-learn, NumPy, and SciPy for performing mathematicsLearn complex statistical and mathematical concepts with the help of hands-on examples and expert guidanceBook Description Discrete mathematics deals with studying countable, distinct elements, and its principles are widely used in building algorithms for computer science and data science. The knowledge of discrete math concepts will help you understand the algorithms, binary, and general mathematics that sit at the core of data-driven tasks. Practical Discrete Mathematics is a comprehensive introduction for those who are new to the mathematics of countable objects. This book will help you get up to speed with using discrete math principles to take your computer science skills to a more advanced level. As you learn the language of discrete mathematics, you'll also cover methods crucial to studying and describing computer science and machine learning objects and algorithms. The chapters that follow will guide you through how memory and CPUs work. In addition to this, you'll understand how to analyze data for useful patterns, before finally exploring how to apply math concepts in network routing, web searching, and data science. By the end of this book, you'll have a deeper understanding of discrete math and its applications in computer science, and be ready to work on real-world algorithm development and machine learning. What you will learnUnderstand the terminology and methods in discrete math and their usage in algorithms and data problemsUse Boolean algebra in formal logic and elementary control structuresImplement combinatorics to measure computational complexity and manage memory allocationUse random variables, calculate descriptive statistics, and find average-case computational complexitySolve graph problems involved in routing, pathfinding, and graph searches, such as depth-first searchPerform ML tasks such as data visualization, regression, and dimensionality reductionWho this book is for This book is for computer scientists looking to expand their knowledge of discrete math, the core topic of their field. University students looking to get hands-on with computer science, mathematics, statistics, engineering, or related disciplines will also find this book useful. Basic Python programming skills and knowledge of elementary real-number algebra are required to get started with this book.