[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7APPNPHCFM9VT6VKR7FBK1S":3,"skill-same:01M7APPNPHCFM9VT6VKR7FBK1S":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7APPNPHCFM9VT6VKR7FBK1S","sci-linear-algebra-differential-equations-and-optimization",null,"Use when solving the actual mathematical problem: linear systems, factorizations, least squares, eigenvalues and sparse solvers; ODEs including stiffness, solver choice and adaptive stepping; PDEs by finite difference, finite element and finite volume, and scientific machine learning; optimization (convex, gradient-based, derivative-free, constrained); and interpolation, quadrature and transforms.","the-vibey-project\u002Fvibey","the-vibey-project","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F329298758?v=4","01M7AJHGZ9722CTJ4JNQZVRH0Q","the vibey project","01M7AJHGZVMG2K7TGXQ6XFHVG3",5,"MIT","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fmath-science-programming\u002Fskills\u002Fsci-linear-algebra-differential-equations-and-optimization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sci-linear-algebra-differential-equations-and-optimization\ndescription: \"Use when solving the actual mathematical problem: linear systems, factorizations, least squares, eigenvalues and sparse solvers; ODEs including stiffness, solver choice and adaptive stepping; PDEs by finite difference, finite element and finite volume, and scientific machine learning; optimization (convex, gradient-based, derivative-free, constrained); and interpolation, quadrature and transforms.\"\n---\n\n# Math and Science Programming: Linear Algebra, Differential Equations, Optimization, and Quadrature\n\n> **Part 3 of 5** of the *Math and Science Programming* reference (plugin `math-science-programming`), covering §6–§9. Sibling skills: `sci-floating-point-and-numerical-foundations` (§0–§3), `sci-tooling-and-symbolic-computation` (§4–§5), `sci-statistics-performance-and-reproducibility` (§10–§14), `sci-reference` (§15–§20). Section numbers are shared across the set; a reference written as §N → `skill` points into that sibling skill.\n>\n> **Currency:** Verified August 2026. See §17 → `sci-reference` for the currency snapshot and what goes stale first.\n\n> **How to read this.** Reference for engineers doing numerical work, and for scientists\n> who ended up writing production software by accident. Three markers:\n> - **[DURABLE]** — numerical analysis, and the engineering practice around it. Most of\n>   this document; **floating point hasn't changed since 1985.**\n> - **[VERSIONED]** — tools, libraries, ecosystem.\n> - **[CONTESTED]** — genuine disagreement.\n>\n> **⚠️ GOTCHA** boxes mark the places where code runs, produces numbers, and the numbers\n> are wrong.\n>\n> **The three framings that organize everything below:**\n> 1. **⚠️ Your code will produce plausible wrong answers, and nothing will crash.** This is\n>    the defining hazard of the whole domain. A web service that breaks returns a 500;\n>    numerical code that breaks returns a `float`. **Every practice in §13 → `sci-statistics-performance-and-reproducibility` and §14 → `sci-statistics-performance-and-reproducibility` exists\n>    because of this one asymmetry.**\n> 2. **You are not computing with real numbers.** You're computing with a finite subset of\n>    the rationals that doesn't obey associativity or distributivity (§1 → `sci-floating-point-and-numerical-foundations`). **Most numerical\n>    bugs are a failure to internalize that**, and the rest are conditioning problems (§2 → `sci-floating-point-and-numerical-foundations`).\n> 3. **⚠️ Do not write the algorithm.** LAPACK, SUNDIALS, and the rest represent\n>    person-centuries of numerical expertise that you will not replicate. **Your job is to\n>    choose the right routine, feed it a well-conditioned problem, and check the\n>    answer** — see §3 → `sci-floating-point-and-numerical-foundations` and the anti-pattern table.\n\n---\n\n## §6. Linear Algebra\n\n**[DURABLE] The most important practical rule in this entire document:**\n\n> **⚠️ GOTCHA — never invert a matrix to solve a linear system.**\n> `x = inv(A) @ b` is slower, less accurate, and less numerically stable than\n> `x = solve(A, b)`. **The explicit inverse is almost never what you want** — if you find\n> yourself computing one, you are probably solving a system, and there is a factorization\n> for it. **Same for `det(A)` as a singularity test: it overflows, underflows, and tells\n> you less than the condition number does.**\n\n**Pick the factorization to match the matrix**:\n\n| Structure | Use | Cost |\n|---|---|---|\n| **General square** | **LU with partial pivoting** | ~⅔n³ |\n| **Symmetric positive definite** | ⚠️ **Cholesky — 2× faster and more stable. Use it whenever it applies** | ~⅓n³ |\n| **Least squares \u002F overdetermined** | ⚠️ **QR, not the normal equations** — forming AᵀA **squares the condition number** | ~2mn² |\n| **Rank-deficient, ill-conditioned, or you need structure** | **SVD** — ⚠️ **the most informative and most expensive** | ~O(mn²) |\n| **Symmetric eigenproblem** | Symmetric QR \u002F divide-and-conquer | |\n| **Large sparse** | **Iterative: CG (SPD), GMRES\u002FBiCGSTAB (general), LSQR** | Depends |\n\n**⚠️ Sparse is a different discipline.** Store in CSR\u002FCSC\u002FCOO; ⚠️ **fill-in during\nfactorization is the central problem**, mitigated by reordering (AMD, METIS). **Iterative\nmethods live or die by preconditioning** — ⚠️ **an unpreconditioned Krylov solver on a\npoorly-conditioned system will converge slowly or not at all, and \"not converging\" is the\ndefault state.** Jacobi, ILU, algebraic multigrid, domain decomposition.\n\n**Libraries**: **SuiteSparse** (⚠️ **Tim Davis's work — UMFPACK, CHOLMOD; the standard**),\n**PETSc** and **Trilinos** for large-scale parallel, **Eigen** (C++ header-only),\n**ARPACK** for large eigenproblems, **cuSOLVER\u002FcuSPARSE** on GPU.\n\n---\n\n## §7. Differential Equations and Simulation\n\n### 7.1 ODEs\n\n**[DURABLE] The single most important question: is your system stiff?**\n\n**⚠️ Stiffness means widely-separated time scales** — a fast transient alongside slow\ndynamics. **The tell: an explicit solver takes absurdly tiny steps and crawls**, not\nbecause accuracy demands it but because stability does. **Chemical kinetics, circuit\nsimulation, and reaction-diffusion are routinely stiff.**\n\n| | **Non-stiff** | **Stiff** |\n|---|---|---|\n| Methods | Explicit RK (Dormand–Prince RK45), Adams–Bashforth | ⚠️ **Implicit: BDF, Radau, Rosenbrock** |\n| Cost per step | Cheap | Expensive — solves a nonlinear system, needs a Jacobian |\n| **Use when** | Smooth, comparable time scales | ⚠️ **Explicit is crawling** |\n\n**⚠️ Structure-preserving integrators matter more than accuracy order for long runs**:\n**symplectic integrators for Hamiltonian systems** (⚠️ **they conserve energy over\nastronomically long integrations where a \"more accurate\" RK method drifts**), and\n**geometric integrators generally.** **If you're doing orbital mechanics or molecular\ndynamics and using RK45, that's likely the bug.**\n\n**Also**: **adaptive stepping with error control** (⚠️ **set `rtol` and `atol` deliberately\n— the defaults are rarely right for your scaling**), **event detection** for\ndiscontinuities, **DAEs** (index matters), and **sensitivity analysis \u002F adjoints** for\ngradients through a solve.\n\n**Libraries**: **SUNDIALS** (CVODE\u002FIDA\u002FARKODE — ⚠️ **the reference implementation, wrapped\nby nearly everything**), **`scipy.integrate.solve_ivp`**, **DifferentialEquations.jl**\n(⚠️ **the most comprehensive ODE ecosystem anywhere, and a genuine reason to consider\nJulia**), MATLAB's `ode45`\u002F`ode15s`.\n\n### 7.2 PDEs\n\n**The discretization families**: **finite difference** (simple, structured grids),\n**finite volume** (⚠️ **conservative by construction — the right choice for fluids and\nanything with conservation laws**), **finite element** (complex geometry, rigorous error\ntheory), **spectral** (⚠️ **exponential convergence for smooth problems on simple\ndomains**), and **meshless\u002Fparticle** methods.\n\n**⚠️ The CFL condition** governs explicit time-stepping stability: your time step is\nbounded by the mesh spacing over the wave speed. **Refining the mesh forces smaller time\nsteps**, which is why explicit schemes get expensive quadratically.\n\n**Frameworks**: **FEniCS\u002FFiredrake** (⚠️ **write the weak form, get a solver — genuinely\nremarkable**), **deal.II**, **MFEM**, **OpenFOAM** (CFD), **SU2**, **Gmsh** for meshing,\n**ParaView\u002FVisIt** for visualization.\n\n**⚠️ And the practical truth: meshing is usually the hard part, not solving.** Budget\naccordingly.\n\n### 7.3 Scientific machine learning\n**[VERSIONED]** **PINNs**, **neural ODEs**, **operator learning (DeepONet, Fourier Neural\nOperator)**, and hybrid physics-ML models. ⚠️ **Promising and genuinely oversold: for\nclassical forward problems on well-posed domains, a good conventional solver is usually\nfaster and far more reliable.** The stronger cases are inverse problems, surrogate models\nfor repeated queries, and problems where the governing equations are partly unknown.\n\n---\n\n## §8. Optimization\n\n**[DURABLE] Classify the problem before choosing a method — this is most of the work.**\n\n```\nIs it convex?          → YES: a global optimum exists and is findable. Say so, and exploit it\n                         NO: you get a local optimum. Multi-start, or accept it\nDo you have gradients? → AD (§5) is almost always available and almost always worth it\nConstraints?           → Linear (LP\u002FQP), nonlinear (SQP, interior point), or none\nSmooth?                → Non-smooth needs subgradient\u002Fproximal methods\nExpensive to evaluate? → Bayesian optimization \u002F surrogate methods\nDiscrete?              → MILP, or see a theory-of-computation reference on NP-hardness\n```\n\n| Class | Methods | Tools |\n|---|---|---|\n| **LP \u002F QP \u002F conic** | Simplex, interior point | ⚠️ **Gurobi, CPLEX, Mosek (commercial, much faster); HiGHS, OSQP, SCS, Clarabel (open)** |\n| **Smooth unconstrained** | BFGS, L-BFGS, Newton, trust region | scipy.optimize, NLopt, Optim.jl |\n| **Constrained nonlinear** | SQP, interior point | **IPOPT**, SNOPT, `scipy` SLSQP |\n| **Least squares** | Levenberg–Marquardt, Gauss–Newton | Ceres, `least_squares` |\n| **Global \u002F derivative-free** | Nelder–Mead, CMA-ES, DIRECT, differential evolution | NLopt, pymoo |\n| **Modelling layers** | — | **CVXPY**, JuMP.jl, Pyomo, AMPL |\n\n> **⚠️ GOTCHA — the optimization failure modes that waste the most time:**\n> - **Not scaling variables.** ⚠️ **If one variable is ~10⁻⁶ and another ~10⁶, the solver\n>   sees a pathological problem. Non-dimensionalize.** This is the most common cause of\n>   \"the optimizer won't converge.\"\n> - **Finite-difference gradients when AD was available.** Slower, less accurate, and it\n>   inherits §2 → `sci-floating-point-and-numerical-foundations`'s differentiation ill-conditioning.\n> - **⚠️ Believing a local optimum is global** in a non-convex problem.\n> - **Ignoring the exit flag.** ⚠️ **Solvers return status codes and people read only `x`.**\n>   \"Max iterations reached\" is not convergence.\n> - **Reformulating a convex problem into a non-convex one** by accident — CVXPY's\n>   disciplined convex programming rules exist to prevent exactly this.\n\n**⚠️ §8.4 Inverse and ill-posed problems** deserve their own note: fitting parameters to\ndata is often **ill-posed**, and the fix is **regularization** — Tikhonov\u002Fridge, L1\u002Flasso,\ntotal variation — with the regularization parameter chosen by **L-curve or cross-\nvalidation**, not by eye. **An unregularized inverse problem fits noise beautifully.**\n\n---\n\n## §9. Interpolation, Quadrature, Transforms\n\n**Interpolation**: ⚠️ **Do not fit high-degree polynomials to equispaced points** —\n**Runge's phenomenon** makes the error explode at the endpoints. **Use splines (cubic, or\nmonotone PCHIP if overshoot matters), or Chebyshev nodes** if you control the sampling.\n**Interpolation ≠ regression**: interpolation passes through every point (⚠️ **including\nthe noise**); fit a smoother if the data is noisy.\n\n**Quadrature**: **Gauss–Legendre** (exceptional for smooth integrands), **adaptive\nClenshaw–Curtis**, **QUADPACK** under `scipy.integrate.quad`. ⚠️ **For dimensions above\n~4, deterministic quadrature dies to the curse of dimensionality — use Monte Carlo or\nquasi-Monte Carlo (Sobol), whose error is dimension-independent.** Handle **singularities\nand infinite domains with a variable transformation**, not brute force.\n\n**Transforms**: **FFT** — ⚠️ **O(n log n), and the workhorse of signal processing and\nspectral methods.** **FFTW** is the reference implementation. Know the pitfalls:\n**aliasing** (sample above Nyquist), **spectral leakage** (window your data), **and the\nnormalization convention differs between libraries** — ⚠️ **check whether the 1\u002FN is on the\nforward or inverse transform before comparing results across tools.**\n","# Math and Science Programming: Linear Algebra, Differential Equations, Optimization, and Quadrature\n\n> **Part 3 of 5** of the *Math and Science Programming* reference (plugin `math-science-programming`), covering §6–§9. Sibling skills: `sci-floating-point-and-numerical-foundations` (§0–§3), `sci-tooling-and-symbolic-computation` (§4–§5), `sci-statistics-performance-and-reproducibility` (§10–§14), `sci-reference` (§15–§20). Section numbers are shared across the set; a reference written as §N → `skill` points into that sibling skill.\n>\n> **Currency:** Verified August 2026. See §17 → `sci-reference` for the currency snapshot and what goes stale first.\n\n> **How to read this.** Reference for engineers doing numerical work, and for scientists\n> who ended up writing production software by accident. Three markers:\n> - **[DURABLE]** — numerical analysis, and the engineering practice around it. Most of\n>   this document; **floating point hasn't changed since 1985.**\n> - **[VERSIONED]** — tools, libraries, ecosystem.\n> - **[CONTESTED]** — genuine disagreement.\n>\n> **⚠️ GOTCHA** boxes mark the places where code runs, produces numbers, and the numbers\n> are wrong.\n>\n> **The three framings that organize everything below:**\n> 1. **⚠️ Your code will produce plausible wrong answers, and nothing will crash.** This is\n>    the defining hazard of the whole domain. A web service that breaks returns a 500;\n>    numerical code that breaks returns a `float`. **Every practice in §13 → `sci-statistics-performance-and-reproducibility` and §14 → `sci-statistics-performance-and-reproducibility` exists\n>    because of this one asymmetry.**\n> 2. **You are not computing with real numbers.** You're computing with a finite subset of\n>    the rationals that doesn't obey associativity or distributivity (§1 → `sci-floating-point-and-numerical-foundations`). **Most numerical\n>    bugs are a failure to internalize that**, and the rest are conditioning problems (§2 → `sci-floating-point-and-numerical-foundations`).\n> 3. **⚠️ Do not write the algorithm.** LAPACK, SUNDIALS, and the rest represent\n>    person-centuries of numerical expertise that you will not replicate. **Your job is to\n>    choose the right routine, feed it a well-conditioned problem, and check the\n>    answer** — see §3 → `sci-floating-point-and-numerical-foundations` and the anti-pattern table.\n\n---\n\n## §6. Linear Algebra\n\n**[DURABLE] The most important practical rule in this entire document:**\n\n> **⚠️ GOTCHA — never invert a matrix to solve a linear system.**\n> `x = inv(A) @ b` is slower, less accurate, and less numerically stable than\n> `x = solve(A, b)`. **The explicit inverse is almost never what you want** — if you find\n> yourself computing one, you are probably solving a system, and there is a factorization\n> for it. **Same for `det(A)` as a singularity test: it overflows, underflows, and tells\n> you less than the condition number does.**\n\n**Pick the factorization to match the matrix**:\n\n| Structure | Use | Cost |\n|---|---|---|\n| **General square** | **LU with partial pivoting** | ~⅔n³ |\n| **Symmetric positive definite** | ⚠️ **Cholesky — 2× faster and more stable. Use it whenever it applies** | ~⅓n³ |\n| **Least squares \u002F overdetermined** | ⚠️ **QR, not the normal equations** — forming AᵀA **squares the condition number** | ~2mn² |\n| **Rank-deficient, ill-conditioned, or you need structure** | **SVD** — ⚠️ **the most informative and most expensive** | ~O(mn²) |\n| **Symmetric eigenproblem** | Symmetric QR \u002F divide-and-conquer | |\n| **Large sparse** | **Iterative: CG (SPD), GMRES\u002FBiCGSTAB (general), LSQR** | Depends |\n\n**⚠️ Sparse is a different discipline.** Store in CSR\u002FCSC\u002FCOO; ⚠️ **fill-in during\nfactorization is the central problem**, mitigated by reordering (AMD, METIS). **Iterative\nmethods live or die by preconditioning** — ⚠️ **an unpreconditioned Krylov solver on a\npoorly-conditioned system will converge slowly or not at all, and \"not converging\" is the\ndefault state.** Jacobi, ILU, algebraic multigrid, domain decomposition.\n\n**Libraries**: **SuiteSparse** (⚠️ **Tim Davis's work — UMFPACK, CHOLMOD; the standard**),\n**PETSc** and **Trilinos** for large-scale parallel, **Eigen** (C++ header-only),\n**ARPACK** for large eigenproblems, **cuSOLVER\u002FcuSPARSE** on GPU.\n\n---\n\n## §7. Differential Equations and Simulation\n\n### 7.1 ODEs\n\n**[DURABLE] The single most important question: is your system stiff?**\n\n**⚠️ Stiffness means widely-separated time scales** — a fast transient alongside slow\ndynamics. **The tell: an explicit solver takes absurdly tiny steps and crawls**, not\nbecause accuracy demands it but because stability does. **Chemical kinetics, circuit\nsimulation, and reaction-diffusion are routinely stiff.**\n\n| | **Non-stiff** | **Stiff** |\n|---|---|---|\n| Methods | Explicit RK (Dormand–Prince RK45), Adams–Bashforth | ⚠️ **Implicit: BDF, Radau, Rosenbrock** |\n| Cost per step | Cheap | Expensive — solves a nonlinear system, needs a Jacobian |\n| **Use when** | Smooth, comparable time scales | ⚠️ **Explicit is crawling** |\n\n**⚠️ Structure-preserving integrators matter more than accuracy order for long runs**:\n**symplectic integrators for Hamiltonian systems** (⚠️ **they conserve energy over\nastronomically long integrations where a \"more accurate\" RK method drifts**), and\n**geometric integrators generally.** **If you're doing orbital mechanics or molecular\ndynamics and using RK45, that's likely the bug.**\n\n**Also**: **adaptive stepping with error control** (⚠️ **set `rtol` and `atol` deliberately\n— the defaults are rarely right for your scaling**), **event detection** for\ndiscontinuities, **DAEs** (index matters), and **sensitivity analysis \u002F adjoints** for\ngradients through a solve.\n\n**Libraries**: **SUNDIALS** (CVODE\u002FIDA\u002FARKODE — ⚠️ **the reference implementation, wrapped\nby nearly everything**), **`scipy.integrate.solve_ivp`**, **DifferentialEquations.jl**\n(⚠️ **the most comprehensive ODE ecosystem anywhere, and a genuine reason to consider\nJulia**), MATLAB's `ode45`\u002F`ode15s`.\n\n### 7.2 PDEs\n\n**The discretization families**: **finite difference** (simple, structured grids),\n**finite volume** (⚠️ **conservative by construction — the right choice for fluids and\nanything with conservation laws**), **finite element** (complex geometry, rigorous error\ntheory), **spectral** (⚠️ **exponential convergence for smooth problems on simple\ndomains**), and **meshless\u002Fparticle** methods.\n\n**⚠️ The CFL condition** governs explicit time-stepping stability: your time step is\nbounded by the mesh spacing over the wave speed. **Refining the mesh forces smaller time\nsteps**, which is why explicit schemes get expensive quadratically.\n\n**Frameworks**: **FEniCS\u002FFiredrake** (⚠️ **write the weak form, get a solver — genuinely\nremarkable**), **deal.II**, **MFEM**, **OpenFOAM** (CFD), **SU2**, **Gmsh** for meshing,\n**ParaView\u002FVisIt** for visualization.\n\n**⚠️ And the practical truth: meshing is usually the hard part, not solving.** Budget\naccordingly.\n\n### 7.3 Scientific machine learning\n**[VERSIONED]** **PINNs**, **neural ODEs**, **operator learning (DeepONet, Fourier Neural\nOperator)**, and hybrid physics-ML models. ⚠️ **Promising and genuinely oversold: for\nclassical forward problems on well-posed domains, a good conventional solver is usually\nfaster and far more reliable.** The stronger cases are inverse problems, surrogate models\nfor repeated queries, and problems where the governing equations are partly unknown.\n\n---\n\n## §8. Optimization\n\n**[DURABLE] Classify the problem before choosing a method — this is most of the work.**\n\n```\nIs it convex?          → YES: a global optimum exists and is findable. Say so, and exploit it\n                         NO: you get a local optimum. Multi-start, or accept it\nDo you have gradients? → AD (§5) is almost always available and almost always worth it\nConstraints?           → Linear (LP\u002FQP), nonlinear (SQP, interior point), or none\nSmooth?                → Non-smooth needs subgradient\u002Fproximal methods\nExpensive to evaluate? → Bayesian optimization \u002F surrogate methods\nDiscrete?              → MILP, or see a theory-of-computation reference on NP-hardness\n```\n\n| Class | Methods | Tools |\n|---|---|---|\n| **LP \u002F QP \u002F conic** | Simplex, interior point | ⚠️ **Gurobi, CPLEX, Mosek (commercial, much faster); HiGHS, OSQP, SCS, Clarabel (open)** |\n| **Smooth unconstrained** | BFGS, L-BFGS, Newton, trust region | scipy.optimize, NLopt, Optim.jl |\n| **Constrained nonlinear** | SQP, interior point | **IPOPT**, SNOPT, `scipy` SLSQP |\n| **Least squares** | Levenberg–Marquardt, Gauss–Newton | Ceres, `least_squares` |\n| **Global \u002F derivative-free** | Nelder–Mead, CMA-ES, DIRECT, differential evolution | NLopt, pymoo |\n| **Modelling layers** | — | **CVXPY**, JuMP.jl, Pyomo, AMPL |\n\n> **⚠️ GOTCHA — the optimization failure modes that waste the most time:**\n> - **Not scaling variables.** ⚠️ **If one variable is ~10⁻⁶ and another ~10⁶, the solver\n>   sees a pathological problem. Non-dimensionalize.** This is the most common cause of\n>   \"the optimizer won't converge.\"\n> - **Finite-difference gradients when AD was available.** Slower, less accurate, and it\n>   inherits §2 → `sci-floating-point-and-numerical-foundations`'s differentiation ill-conditioning.\n> - **⚠️ Believing a local optimum is global** in a non-convex problem.\n> - **Ignoring the exit flag.** ⚠️ **Solvers return status codes and people read only `x`.**\n>   \"Max iterations reached\" is not convergence.\n> - **Reformulating a convex problem into a non-convex one** by accident — CVXPY's\n>   disciplined convex programming rules exist to prevent exactly this.\n\n**⚠️ §8.4 Inverse and ill-posed problems** deserve their own note: fitting parameters to\ndata is often **ill-posed**, and the fix is **regularization** — Tikhonov\u002Fridge, L1\u002Flasso,\ntotal variation — with the regularization parameter chosen by **L-curve or cross-\nvalidation**, not by eye. **An unregularized inverse problem fits noise beautifully.**\n\n---\n\n## §9. Interpolation, Quadrature, Transforms\n\n**Interpolation**: ⚠️ **Do not fit high-degree polynomials to equispaced points** —\n**Runge's phenomenon** makes the error explode at the endpoints. **Use splines (cubic, or\nmonotone PCHIP if overshoot matters), or Chebyshev nodes** if you control the sampling.\n**Interpolation ≠ regression**: interpolation passes through every point (⚠️ **including\nthe noise**); fit a smoother if the data is noisy.\n\n**Quadrature**: **Gauss–Legendre** (exceptional for smooth integrands), **adaptive\nClenshaw–Curtis**, **QUADPACK** under `scipy.integrate.quad`. ⚠️ **For dimensions above\n~4, deterministic quadrature dies to the curse of dimensionality — use Monte Carlo or\nquasi-Monte Carlo (Sobol), whose error is dimension-independent.** Handle **singularities\nand infinite domains with a variable transformation**, not brute force.\n\n**Transforms**: **FFT** — ⚠️ **O(n log n), and the workhorse of signal processing and\nspectral methods.** **FFTW** is the reference implementation. Know the pitfalls:\n**aliasing** (sample above Nyquist), **spectral leakage** (window your data), **and the\nnormalization convention differs between libraries** — ⚠️ **check whether the 1\u002FN is on the\nforward or inverse transform before comparing results across tools.**\n",{"name":5,"description":7},"develop","ae32736a1aabddabca5d2c96d665aa0ebc7d8700","src\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fmath-science-programming\u002Fskills\u002Fsci-linear-algebra-differential-equations-and-optimization",3,"https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey","https:\u002F\u002Fthe-vibey-project.github.io\u002Fvibey\u002F","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project","https:\u002F\u002Fvibewithadam.matthewsteinberger.com","freedom for software engineers","2026-11-15 05:47:42",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add the-vibey-project\u002Fvibey --skill sci-linear-algebra-differential-equations-and-optimization",{"tool":40,"command":41},"bunx","bunx skills add the-vibey-project\u002Fvibey --skill sci-linear-algebra-differential-equations-and-optimization",{"tool":43,"command":44},"pnpm","pnpm dlx skills add the-vibey-project\u002Fvibey --skill sci-linear-algebra-differential-equations-and-optimization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fmath-science-programming\u002Fskills\u002Fsci-linear-algebra-differential-equations-and-optimization\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7AT1FQJAE1FQYAMDTF490Y4","white-paper-writing","Use when writing white papers, technical reports, policy documents, thought leadership pieces, or any long-form authoritative document. Triggers on requests to write, structure, outline, or review white papers, technical reports, position papers, policy briefs, or evidence-driven arguments. Also use for B2B content marketing strategy, technical documentation requiring authority, academic-style reports, or any document that must educate while persuading. Use when someone asks \"how should I structure this\" for a long-form document.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fwhite-paper-writing\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7AT16BJRJJKK2MASXRZS76G","prose-technical-mechanics","Use when editing or writing prose at a technical\u002Fmechanical level: choosing between Anglo-Saxon and Latinate diction, placing information in topic vs stress positions, writing periodic vs cumulative sentences, handling sentence rhythm, punctuation as logic, transitions, paragraph structure, or phonesthetics. Use when someone wants to understand WHY prose works or doesn't, not just surface-level style advice. Triggers on word choice, sentence structure, emphasis, rhythm, diction, or any deep writing mechanics question.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fprose-technical-mechanics\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7AT0W9HT0ZZ9Y287NW99MR3","prose-mechanics","Use when writing, editing, or analyzing prose style; when trying to avoid generic AI-sounding writing; when applying specific prose styles such as journalistic, academic, narrative, KJV biblical, Hemingway plain, Latinate\u002FJamesian, Orwellian, Augustan, Victorian, Early Modern (Bacon, Browne, Milton), or free indirect discourse; or when coaching someone on writing voice and mechanics. Triggers on any request to improve, analyze, or write in a specific prose style, to fix \"AI-sounding\" writing, to make prose more vivid or concrete, to vary sentence rhythm, or to understand how a particular writer achieves their effects.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fprose-mechanics\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7AT0KR635JX66X2X6F3E2CP","narrative-structure","Use when structuring stories, pitches, presentations, white papers, or any persuasive narrative; analyzing the hero's journey in fiction or non-fiction; applying StoryBrand for business communication; designing narrative arcs for thought leadership; or understanding Vogler, Snyder, Propp, or Campbell frameworks. Triggers on any narrative structure, storytelling, pitch structure, StoryBrand, hero's journey, three-act structure, Freytag, Save the Cat, narrative arc, or \"how should I structure this story\u002Fpitch\u002Fpresentation\" request.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fnarrative-structure\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7AT0AKGW09NKKZDYBT8VRDE","legal-brief-writing","Use when writing legal briefs, motions, or any court filing; when analyzing judicial cognition and persuasion; when applying elite brief-writing techniques from Roberts, Clement, Kagan, Garner; or when structuring legal arguments for maximum persuasion. Also use for autistic\u002Fneurodivergent advocates who need to understand how their natural communication style maps to elite legal advocacy. Triggers on any legal writing, brief drafting, motion preparation, or legal argument structuring request.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Flegal-brief-writing\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7AT00VWPS4Q8B5VEMXX9NQT","journal-publishability-criteria","Use whenever a research paper, article or preprint is being written, revised, reviewed or published, and specifically before every publication of docs\u002Fpaper.md. Covers what legitimate journals actually gate on, in order of gating — the editor's desk screen (scope, novelty, package problems), what reviewers judge (methodological soundness, claims the evidence can carry, statistical and qualitative reporting), EQUATOR reporting guidelines, the ICMJE authorship criteria, COPE's view of text recycling, the near-universal generative-AI policy (no AI author, disclosure, author responsibility), TOP 2025 transparency standards, how to verify a journal is legitimate, submitting without an institution, and a pre-submission checklist. Triggers on requests to evaluate, review, prepare or submit a paper, to judge publishability, to write a declarations or data-availability section, to disclose AI use, or to check a journal.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fjournal-publishability-criteria\u002FSKILL.md",[],[]]