Math Foundations
This package is a collection of functions and notebooks I built as I worked through the book Foundations of Mathematics: A Preparatory Course.
In essence, this book is a primer on basic mathematical concepts serving as a bridge into college mathematics. It starts with the very basics of arithmetical computation, moving onto basic mathematical functions, geometry and trigonometry. From there it covers more advanced topics such as basic linear algebra, calculus, probability and statistics, and concluding with complex numbers.
The English edition is a mostly AI translation of the fourth edition of the original German text. There are a lot of dad jokes and bad puns in the text, but it is definitely clearly written and explains the concepts well. The very approachable style makes it quite suitable for self-study. I used it as a review in preparation of my study for more advanced mathematical topics.
The code in this package is not meant to be a complete implementation of the book, but rather stuff that I created in order to gain practice and a deeper understanding of the concepts in the book.
Besides the package documentation, you will also find in the left navigation tab links to documents that explain topics covered in the book. These often provide more details than covered in the book. Originally I planned to add documentation for all the advanced topics listed above. Subsequently, I decided it makes more sense to only include the coverage of Algebra, Geometry and Trigonometry in this repository. Since I plan to create separate repositories on Linear Algebra, Calculus, Probability and Statistics, and Complex Numbers (Analysis) where I go in depth into those topics, I will add a Basics folder to each of these to cover the material in this book. Follow the links in the FourM Study Guides section of the left navigation tab to find these (so far there is only one for Linear Algebra).
Basic Mathematical Functions
The code for the basic mathematical functions is in the basic_maths.jl file.
Math_Foundations.accrued — Method
function accrued(i::Real,p::Real,c::Int64) -> Float64i is interest, p is period (1 = one year), c is capital return accrued value
Math_Foundations.accrued_apr — Method
function accrued_apr(i::Real,p::Real,c::Int64) -> Float64i is interest, p is period (1 = one year), c is capital return accrued value using daily apr for interest
Math_Foundations.calculate_parabola_roots_amrvw — Function
calculate_parabola_roots_amrvw(a₂::Float64, a₁::Float64=0.0, a₀::Float64=0.0) -> Vector{ComplexF64}Pure computational function to find parabola roots using AMRVW.jl Returns the roots without any plotting
Math_Foundations.calculate_parabola_roots_polynomial — Function
calculate_parabola_roots_polynomial(a₂::Float64, a₁::Float64=0.0, a₀::Float64=0.0) -> Vector{ComplexF64}Pure computational function to find parabola roots using Polynomials.jl Returns the roots without any plotting
Math_Foundations.calculate_parabola_roots_quadratic — Function
calculate_parabola_roots_quadratic(a₂::Float64, a₁::Float64=0.0, a₀::Float64=0.0) -> Vector{ComplexF64}Pure computational function to find parabola roots using the quadratic formula Returns the roots without any plotting
Math_Foundations.expa2x — Method
expa2x(a::Real,x::Real)exponential function where a > 0 and x is any Real
Math_Foundations.nth_root — Method
nth_root(x,n) → cCalculate nth root of x handling negative x properly
Math_Foundations.plot_hyperbola — Function
p
plot_hyperbola(a::Float64=1.0, h::Float64=0.0, k::Float64=0.0)Plot hyperbola with equation y = a/(x-h) + b, where a,h and k are scaling parameters
Math_Foundations.plot_hyperbola_axes_direct — Method
plot_hyperbola_axes_direct(a::Float64, b::Float64)Plot hyperbola of the form (x²/a²) - (y²/b²) = 1 a and b are the semi-major and semi-minor axes
Math_Foundations.plot_hyperbola_axes_varx — Method
plot_hyperbola_axes_varx(a::Float64, b::Float64)Plot hyperbola of the form (x²/a²) - (y²/b²) = 1 a and b are the semi-major and semi-minor axes
Math_Foundations.plot_parabola — Method
plot_parabola(p::Polynomial, r3::Union{Vector{Float64},Vector{ComplexF64}}, a₂::Float64, a₁::Float64, a₀::Float64, str::String)Plot the parabola using the given polynomial and its roots
Math_Foundations.plot_parabola_roots_amrvw — Function
plot_parabola_roots_amrvw(a₂::Float64, a₁::Float64=0.0, a₀::Float64=0.0) -> Vector{Float64}AMRVW version of plotting parabola with roots Combines computation and visualization - computation always succeeds, plotting may fail gracefully Returns only real roots for backward compatibility with original function
Math_Foundations.plot_parabola_roots_polynomial — Function
plot_parabola_roots_polynomial(a₂::Float64, a₁::Float64=0.0, a₀::Float64=0.0) -> Vector{Float64}Polynomial version of plotting parabola with roots Combines computation and visualization - computation always succeeds, plotting may fail gracefully Returns only real roots for backward compatibility with original function
Math_Foundations.plot_parabola_roots_quadratic — Function
plot_parabola_roots_quadratic(a₂::Float64, a₁::Float64=0.0, a₀::Float64=0.0) -> Vector{Float64}Quadratic formula version of plotting parabola with roots Combines computation and visualization - computation always succeeds, plotting may fail gracefully Returns only real roots for backward compatibility with original function
Math_Foundations.triangle_area_perim — Method
triangle_area_perim(a::Float64, b::Float64, c::Float64) -> Float64
Calculate ρ, area and perimeter of a triangle using Heron's formula