Externally indexed torrent
If you are the original uploader, contact staff to have it moved to your account
Textbook in PDF format
This book teaches you to solve physics problems using the functional programming paradigm. Ideal for first-time programmers and science aficionados alike, it introduces the Haskell programming language and encourages the writing of beautiful code to match the elegant ideas of theoretical physics.
Early chapters cover the basics of coding in Haskell, which has a powerful system of types capable of encoding important mathematical structures in physics, like vectors, derivatives, integrals, scalar fields, vector fields, and differential equations. Later sections of the book explore Newtonian mechanics and electromagnetics—two central pillars of theoretical physics. In addition, you’ll get a deep look into source code, and discover why Haskell’s high-order functions and referential transparency serve physics so well.
Along the way, you’ll learn
ow to write beautiful code that expresses fundamental physical principles
How to make graphs and animations of interesting situations
How to program in a language that looks like mathematics
How types, high order functions, and referential transparency serve physics well
Who This Book Is For
This book arises from a course in computational physics I teach to second-year students of physics at Lebanon Valley College. I expect that you have had one year of introductory physics and at least one semester of calculus. No previous programming experience is required. The purpose of the book is to deepen your understanding of basic physics by exploring it in a new language. By using a formal language to express the ideas of physics, we will stretch our ability to formulate and communicate the ideas of physics as we also calculate quantities we are interested in and make graphs and animations.
Because the book begins with a self-contained introduction to the Haskell programming language for people who have not programmed before, it can be used as a supplement for introductory and intermediate courses in physics in which the instructor or student
•wishes to include a computational component, or
•desires a deeper understanding of the structure of basic physical theories.
The book is also appropriate for self-study by any student who wishes to deepen their understanding of physics by programming.
HASKELL PRIMER FOR PHYSICISTS
Calculating with Haskell
Writing Basic Functions
Types and Entities
Describing Motion
Working with Lists
Higher-Order Functions
Graphing Functions
Type Classes
Tuples and Type Constructors
Describing Motion in Three Dimensions
Creating Graphs
Creating Stand-Alone Programs
Creating 2D and 3D Animations
EXPRESSING NEWTONIAN MECHANICS AND SOLVING PROBLEMS
Newton’s Second Law and Differential Equations
Mechanics in One Dimension
Mechanics in Three Dimensions
Satellite, Projectile, and Proton Motion
A Very Short Primer on Relativity
Interacting Particles
Springs, Billiard Balls, and a Guitar String
EXPRESSING ELECTROMAGNETIC THEORY AND SOLVING PROBLEMS
Electricity
Coordinate Systems and Fields
Curves, Surfaces, and Volumes
Electric Charge
Electric Field
Electric Current
Magnetic Field
The Lorentz Force Law
The Maxwell Equations
Installing Haskell