Numerical root-finding algorithms: An unconventional approach. Part3

An unconventional approach to solving with Lambert’s W function Before we move on to a practical real-world use case for an approximation root-finding algorithm, I want to share an anecdote from a time when, out of simple curiosity and a bit of boredom, I managed to solve an equation typically requiring the Lambert W function by approximating the root using the Newton-Raphson method. 1. The video One day, a video on solving the equation \(2^x + x = 5\) popped up in my YouTube feed. The \(x\) in the exponent immediately piqued my curiosity. After watching the entire video, I was introduced to the Lambert W function—“Nice to meet you,” I thought. For a moment, I debated whether I should dive deeper into learning about it, or consider how I might use it in the future. Then, I took another look at the equation and noticed it was a differentiable function. That’s when it hit me: I should tackle the problem using one of the root-finding algorithms. ...

December 14, 2024 · 7 min · Pato Diaz

Numerical root-finding algorithms: Bisection, Newton-Raphson and Secant. Part2

Continuing our series on root-finding algorithms, this article delves deeper into the Bisection (linear convergence), Newton-Raphson (quadratic convergence), and Secant (super linear convergence) methods. Each of these algorithms has unique strengths, making them suitable for different scenarios. To illustrate their application, we will use the example of calculating the square root of a number—a simple yet insightful problem. Using an approximation algorithm to calculate a square root might seem excessive, but please bear with me throughout this article. I chose the square root because the function is straightforward, and its derivative is relatively simple to calculate, allowing us to work through the exercises more easily. ...

December 2, 2024 · 19 min · Pato Diaz

Numerical root-finding algorithms: Foundations, theory, and advanced methods. Part 1

Root-finding is one of the core problems in computational mathematics. Whether you’re solving equations, optimizing functions, or modeling real-world phenomena, the need to find the roots of functions is ubiquitous. This article explores the foundations of root-finding algorithms, their mathematical principles, convergence properties, and real-world applications. Additionally, we will dive into advanced techniques, such as the Secant Method and Brent’s Method, which extend and improve upon traditional approaches. 1. Introduction to Root-Finding Problems In computational mathematics, finding the root of a function \(f(x)=0\) is essential across a range of fields, from physics and engineering to economics and computer science. A root is simply a value where the function evaluates to zero, and root-finding algorithms are designed to approximate these values when exact solutions are not easily obtainable. ...

November 30, 2024 · 9 min · Pato Diaz

Setting up a local Kubernetes environment with Multipass and bridge networking

Also published at dev.to Introduction Preparing for the Certified Kubernetes Application Developer (CKAD) certification requires a reliable environment for hands-on practice. While cloud providers are often recommended, setting up a local environment can be more cost-effective and provide valuable learning opportunities. In this guide, I’ll walk you through creating a robust local Kubernetes environment using Ubuntu’s Multipass and bridge networking. Why Local Setup? When I started preparing for my CKAD certification, I wanted an environment that would: ...

November 13, 2024 · 6 min · Pato Diaz

How to sync your Obsidian vault using GitHub: A complete guide

Also published at dev.to Introduction Obsidian has become a powerful tool for note-taking and personal knowledge management, but one question often comes up: “How can I sync my notes across devices?” While Obsidian offers a paid sync service, there’s a robust alternative using GitHub that’s both free and secure. In this guide, I’ll walk you through setting up GitHub synchronization for your Obsidian vault, whether you’re on desktop or mobile. Prerequisites Before we begin, you’ll need: ...

November 1, 2024 · 3 min · Pato Diaz

From Pi to Sky: How My Kubernetes Cluster Evolved Beyond Raspberry

Also published at dev.to Ever embarked on a project that seemed straightforward at first, only to find yourself tumbling down a rabbit hole of challenges and discoveries? That’s exactly what happened when I decided to breathe new life into my ageing Kubernetes cluster. What began as a simple upgrade turned into an odyssey through the world of single-board computers, operating systems, and DIY ingenuity. It all started a few years ago with a Raspberry Pi 2, four Raspberry Pi Zeros, and a cluster hat from 8086.net. Little did I know that this modest setup would lead me on a journey spanning multiple hardware platforms, wrestling with ARM architectures, and ultimately crafting my own solutions to keep my cluster alive and kicking. In this post, I’ll take you through the twists and turns of my cluster resurrection project. From the initial roadblocks of discontinued support to the thrill of discovering alternative hardware, and finally, to the satisfaction of creating custom solutions. Whether you’re a fellow tinkerer, a Kubernetes enthusiast, or simply curious about the world of single-board computing, buckle up – this tale of perseverance and problem-solving might just inspire your next tech adventure. ...

September 17, 2024 · 14 min · Pato Diaz