Step-by-step solver for Further Mathematical Methods — ODEs, PDEs, Fourier series, linear algebra, with LaTeX output in Jupyter
Project description
furthermathskit
Step-by-step solver for Further Mathematical Methods
Renders full working as LaTeX in Jupyter notebooks. Falls back to clean plain text in scripts or terminals.
Built from analysis of 3 years of PolyU AMA3724 past exam papers.
Install
pip install furthermathskit
Quick Start
from furthermathskit import *
toolkit_menu() # see all functions
quick_ref() # formula sheet
Functions
Linear Algebra
# Column-sum norm and spectral norm
matrix_norms([[-1,7,3,-3],[7,-1,3,-3],[3,3,-1,-7],[-3,-3,-7,-1]])
# Orthogonal projection of b onto col(A) + least squares
orthogonal_projection(b=[8,0,2,-2], A_list=[[...]])
# Change of basis matrix P_{B<-E} and coordinate vector [X]_B
change_of_basis(E, B, X)
# Jordan form with eigenspace dimension analysis + generalised eigenvector hints
jordan_analysis([[2,1,0,0,0],[0,2,0,0,0],[0,0,3,1,0],[0,0,0,3,1],[0,0,0,0,3]])
# Full SVD decomposition
svd_analysis([[1,2],[2,4]])
ODEs
Functions marked # are safe for exam questions that explicitly ban dsolve — they work purely via eigenvalues, integrals, and manual substitutions.
# 2nd-order constant-coefficient IVP
# Automatically uses undetermined coefficients with printed working
solve_2nd_order_ivp(a=6, b=-1, c=-1, y0=10, dy0=0)
solve_2nd_order_ivp(a=1, b=-4, c=3, y0=2, dy0=1, forcing=exp(5*t))
# Cauchy-Euler a2 t^2 y'' + a1 t y'' + a0 y = 0
# Handles distinct, repeated, and complex roots #
solve_cauchy_euler(1, -3, 4)
solve_cauchy_euler(1, -3, 4, y0=1, dy0=2)
# System X'=AX via eigenvalue method (no dsolve) #
solve_system_eigenvalue([[0,1,0],[0,0,1],[-15,-23,-9]], t0=0, X0_list=[1,1,1])
# Euler-type system tX'=AX (solutions are t^lambda * v) #
solve_system_eigenvalue(A, t0=1, X0_list=[1,1,1], euler_type=True)
# Variation of parameters (no dsolve) #
variation_of_parameters(y1=x*exp(x), y2=x, forcing_expr=2*x**2)
# Exact ODE check + solve for potential function F(x,y)=C #
check_exact_ode(M_expr=cos(y), N_expr=y**3 - x*sin(y))
# Bernoulli ODE y' + P(x)y = Q(x)y^n #
solve_bernoulli(n_val=4, P_expr=-1, Q_expr=-exp(-x))
Market Models
# Solow growth model k' + lambda*k = s*k^alpha (Bernoulli)
solow_growth_model(alpha=Rational(3,11), s_val=Rational(1,3),
lam_val=Rational(1,4), k0=1)
# Market clearing equilibrium ODE
P = Function('P')
Qd = 5*P(t) - 4*P(t).diff(t) + P(t).diff(t,2)
Qs = 2*P(t) + exp(5*t) + 2
market_clearing_equilibrium(Qd, Qs, P0=2, dP0=1)
Fourier / PDE
# Heat IBVP — Neumann BCs (cosine series)
# Smart: if IC is a sum of cosines, uses direct mode matching
# No integration needed — just reads off coefficients
solve_heat_ibvp_neumann(k_val=7, L_val=9, ic_expr=cos(6*pi*x))
# With reaction term ut = k uxx + a u -> substitution u = e^(at) w
solve_heat_ibvp_neumann(k_val=7, L_val=9, ic_expr=cos(6*pi*x),
extra_term="5u", change_var=(5, "u=e^(5t)w -> wt=7wxx"))
# Heat IBVP — Dirichlet BCs (sine series)
solve_heat_ibvp_dirichlet(k_val=5, L_val=pi, ic_expr=sin(3*x))
# Wave IBVP
solve_wave_ibvp(L_val=pi, ic_u_expr=sin(4*x)+2*sin(6*x),
ic_ut_expr=2*sin(10*x))
# Fourier transform PDE on (-inf, inf) — guided steps
fourier_transform_pde({'a': 5, 'b': 3, 'c': 8, 'ic': 'sin(3 pi x)'})
Gram-Schmidt in L²([a,b])
# Orthonormalise a polynomial basis over [0,1]
basis = [S(1), x, x**2, x**3, x**4]
ONB = l2_gram_schmidt(basis, a=0, b=1)
# Project a function onto the ONB
coeffs, reconstruction = l2_project(-10*x**3 + x**4, ONB)
# Raw inner product
l2_inner_product(x, x**2, a=0, b=1) # -> 1/4
Output style
In Jupyter notebooks — all expressions render as proper LaTeX:
- Section headers: styled HTML blocks
- Step-by-step working shown at each stage
- Final answers in a green bordered box
- Eigenvalues, matrices, solutions all rendered via
display(Math(...))
In scripts / terminals — clean Unicode fallback with box-drawing characters.
Topics covered
| Topic | Notes |
|---|---|
| Matrix norms (column-sum, spectral) | Via eigenvalues of AᵀA |
| Orthogonal projection & least squares | Normal equations + null space |
| Change of basis | P_{B←E} and [X]_B |
| Jordan form | With generalised eigenvector hints |
| SVD | Full U, Σ, Vᵀ decomposition |
| 2nd-order ODE IVP | Undetermined coefficients with working |
| Cauchy-Euler ODE | All root cases including complex |
| System of DEs (X'=AX) | Eigenvalue method, no dsolve |
| Euler-type system (tX'=AX) | t^λ solutions |
| Variation of parameters | Full Wronskian working, no dsolve |
| Exact ODE | Check + solve for F(x,y) |
| Bernoulli ODE | w=y^(1-n) substitution |
| Market equilibrium ODE | Arbitrary order |
| Solow growth model | Bernoulli reduction |
| Heat IBVP Neumann | Smart cosine mode matching |
| Heat IBVP Dirichlet | Sine series |
| Heat with reaction term | e^(at)·w substitution trick |
| Wave IBVP | aₙ and bₙ coefficients |
| Fourier transform PDE | Guided procedure + formula |
| Gram-Schmidt L²([a,b]) | Full orthonormalisation |
| L² projection | Coefficient computation + reconstruction |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file furthermathskit-1.0.0.tar.gz.
File metadata
- Download URL: furthermathskit-1.0.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
017670e11b0de3f7c7d412d814a251433e4818b9a52f5344c6f84156fd8477e4
|
|
| MD5 |
6b78fe0d8724fb338b5062ff1862f290
|
|
| BLAKE2b-256 |
248a187bf20a4e56ede882bfe3a2df369904503070ed681f8a944ec7814986af
|
File details
Details for the file furthermathskit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: furthermathskit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cfcf215f25600dac2f43b89f15cbb57407f60fc5362aa99451f1d13e0d8cfa5
|
|
| MD5 |
c664f356812d2f20cb3529ffb8049878
|
|
| BLAKE2b-256 |
1e790cbe0acee2cd0f2094ebc84ac8106c1c440e7d380d4fa904240b351df0c5
|