Thursday, September 11, 2025

Verifying Poiseuille Flow Using OpenFOAM and ParaView - the engineer in me is still alive...

Introduction

In computational fluid dynamics (CFD), verifying the solution of known analytical problems helps build confidence in simulation tools and numerical schemes. One such classical benchmark is Poiseuille flow — a pressure-driven, fully developed laminar flow through a channel.

This blog post shows how I recreated and verified the parabolic velocity profile of Poiseuille flow using OpenFOAM and visualized it using ParaView.

What Is Poiseuille Flow?

Poiseuille flow describes steady, incompressible, laminar flow of a Newtonian fluid in a long, straight channel driven by a pressure gradient. For a 2D rectangular channel, the flow is unidirectional along the channel length and exhibits a parabolic velocity profile in the transverse direction.

Governing Equations

We start with the Navier-Stokes equations simplified under assumptions:

  • Incompressible, steady-state

  • No-slip walls

  • Pressure-driven

  • Fully developed (no dependence on streamwise direction)

For flow in the x-direction, the reduced equation becomes:

μd2udy2=dpdx\mu \frac{d^2 u}{dy^2} = \frac{dp}{dx}

Where:

  • u(y)u(y) is the velocity in x-direction

  • μ\mu is dynamic viscosity

  • dpdx\frac{dp}{dx} is the imposed pressure gradient

Analytical Solution

Solving the second-order ODE gives:

u(y)=12μ(dpdx)y(Hy)u(y) = \frac{1}{2\mu} \left( -\frac{dp}{dx} \right) y(H - y)

Where:

  • HH is the channel height

  • yy varies from 0 (bottom wall) to HH (top wall)

This is a parabola with maximum velocity at the centerline y=H/2y = H/2 and zero velocity at the walls (due to no-slip boundary condition).

CFD Experiment Setup in OpenFOAM

I set up a simple 2D channel geometry using blockMeshDict, and simulated the flow using icoFoam, which is suitable for transient incompressible laminar flows.

📁 Boundary Conditions

  • Inlet: Pressure fixed at 1 unit

  • Outlet: Pressure fixed at 0 unit

  • Walls: No-slip condition (U = (0 0 0))

  • Initial Velocity: (0 0 0) throughout

🧱 Mesh

A rectangular domain:

  • Length = 1 m

  • Height = 0.1 m

  • Depth = very thin (or empty to treat as 2D)

Result: Parabolic Profile in ParaView

Using ParaView, I plotted the x-component of velocity (U_X) along a vertical line from the bottom wall to the top wall at the center of the channel (x = 0.5).

📸 Here's the result:



As expected, the profile is:

  • Zero at both walls (due to no-slip condition)

  • Maximum at the center

  • Symmetric about the mid-height

✅ This matches the theoretical prediction of Poiseuille's parabolic velocity profile.

Key Learnings

  • CFD tools like OpenFOAM can accurately reproduce classical flow profiles

  • Setting appropriate boundary conditions is crucial

  • Post-processing in ParaView enables quantitative verification

  • This benchmark builds confidence before moving to more complex simulations (e.g., turbulence, heat transfer)

Conclusion

Poiseuille flow is more than a textbook example — it's a fundamental test of our CFD setup. Successfully simulating it validates:

  • Solver setup

  • Boundary conditions

  • Mesh quality

  • Visualization pipeline

✅ And as shown, OpenFOAM + ParaView handles it elegantly.


Wednesday, September 10, 2025

The engineer in me is still thriving - verifying the no-slip boundary condition of Fluid Mechanics using OpenFOAM and ParaView...

 


Here i am doing proper CFD post-processing to experimentally verify the no-slip boundary condition using ParaView and the OpenFOAM elbow case. Let’s now interpret the screenshot from a CFD physics point of view.

Setup Summary

  • Case: OpenFOAM elbow (steady incompressible internal flow)

  • Tool: ParaView

  • Filter: Plot Over Line

  • Quantity: U_Magnitude (velocity magnitude)

  • X-axis: arc_length along the line (from one point inside the fluid to the wall)

  • Output: Velocity profile graph

What the Plot Shows

The graph on the right side shows:

  • X-axis: Distance along the probing line (arc_length)

  • Y-axis: Velocity magnitude (U_Magnitude)

The curve rises from a lower value, reaches a plateau around ~1.0, and then drops sharply to near 0 at the right end of the line.

CFD Interpretation of the Image

1. Velocity Profile Inside the Fluid

  • The flat region (plateau around ~1.0) in the middle of the curve indicates uniform flow in the bulk of the fluid (away from walls).

  • This is expected in fully developed or near-uniform flow in a pipe elbow.

2. Sharp Drop in Velocity Near the Wall

  • On both ends (especially the right), the velocity drops rapidly to nearly 0.

  • This is exactly what we expect from the no-slip boundary condition:

    Velocity must be zero at the wall due to the viscous adhesion of the fluid.

This confirms that my line probe passed from:

  • Inside the fluid,

  • Through the boundary layer,

  • Up to the wall.

The no-slip condition is numerically satisfied in simulation.

3. Boundary Layer Visualization

  • The sharp decline in the graph represents the boundary layer — the thin region near the wall where velocity transitions from free-stream to 0.🔹 

4. Numerical Observations

  • The velocity doesn't drop instantly to zero, but over a few sample points — this is due to:

    • Finite resolution of the mesh,

    • Interpolation used in Plot Over Line,

    • Numerical diffusion (small artificial smearing due to discretization).

This is normal and expected in CFD.

CFD Physics Conclusion

Observation CFD Interpretation
Velocity ~0 at wall ✔ No-slip boundary condition is respected
Plateau in middle ✔ Uniform flow in the bulk
Sharp gradient near wall ✔ Boundary layer captured
Small non-zero near-wall velocity Acceptable due to mesh + numerical limits

Thursday, September 4, 2025

From Software to Simulations: My Journey into Fluid Mechanics and the Navier-Stokes Theorem in Plain English...

As a software engineer, I’m used to breaking complex systems into components — loops, states, memory, and flow.

But when I stepped into the world of fluid mechanics, I found something just as elegant: the Navier-Stokes theorem, the core of Computational Fluid Dynamics (CFD).

Here’s how I made sense of this “fluid algorithm” using the tools I already know — abstraction, flow logic, and interpretation.

Software Meets Physics

I began to see fluid particles as objects in motion, and the forces acting on them as functions that change their velocity over time.

Like in physics engines or game loops, the core question remains:
What makes a particle move the way it does?

Breaking Down the Navier-Stokes Equation

Here’s the Navier-Stokes equation, often feared for its complexity, but actually a beautiful balance of terms:

In Plain English:

Mass per unit volume×(Local acceleration+Convective acceleration)=\text{Mass per unit volume} \times (\text{Local acceleration} + \text{Convective acceleration}) = Pressure per unit volume+μ×Laplacian of velocity+Weight per unit volume-\text{Pressure per unit volume} + \mu \times \text{Laplacian of velocity} + \text{Weight per unit volume}


Term-by-Term Interpretation

Term Meaning
🧊 Mass per unit volume Represents how much inertia the fluid has
Local acceleration How fast the velocity is changing at a point
🧭 Convective acceleration How fluid carries velocity changes through space
💨 − Pressure per unit volume Push from surrounding particles (inward force)
🌀 μ × Laplacian of velocity Viscous spreading — like internal friction
🌍 Weight per unit volume Gravity or other body forces acting on fluid


Thinking Like a Programmer

Imagine you’re writing a simulator. For each fluid particle:

mass_density = ...
acceleration = local_acceleration + convective_acceleration

net_force = -pressure_gradient + viscosity_diffusion + body_force

acceleration = net_force / mass_density

It’s just Newton’s law applied to a fluid, per unit volume, using partial derivatives.

What I Learned

  • Fluid motion is a dynamic balance of pressure, viscosity, and momentum.

  • The Navier-Stokes equation is an algorithm for nature’s fluid engine.

  • My software mindset helped me break it down, understand it, and even simulate it.

Conclusion

If you're coming from a programming or systems background, don't fear the math.
Look for the patterns, forces, and balances — the equation is just a logic tree waiting to be read.

For the engineering students, do you remember the free body diagrams used to solve engineering mechanics problems?

The Navier-Stoke theorem is just like that - only the logic of balance is applied to an infinitesimal small grid within a fluid.

"Yatha pinde tatha brahmande"- a Sanskrit phrase from the Yajurveda that means "As is the microcosm, so is the macrocosm," or "As the individual, so the universe" is...

Does not it sound like Calculus?

Enjoy...



Monday, September 1, 2025

In the search of WHY Computational Fluid Dynamics....

I am of the opinion that when we plan to delve into a subject, we must have a clear cut purpose - why we are doing it. This is what I say - first What - then Why - and then only How.

Purpose of learning a subject is essential to fall in love with the subject.

So here we go...

My exploration continues.

Why We Need CFD (Computational Fluid Dynamics)

We need CFD because the governing equations of fluid motion — such as the Navier-Stokes equations — are continuous, nonlinear partial differential equations (PDEs) that describe how fluid velocity, pressure, temperature, and density evolve over time and space.

These equations are derived based on:

- Conservation of mass (Continuity equation)

- Conservation of momentum (Newton’s second law → Navier-Stokes equations)

- Conservation of energy (First law of thermodynamics)

The Core Challenge...

These governing equations are defined in a continuous domain — meaning:

They assume infinitely small control volumes,

Variables like velocity and pressure change smoothly and continuously,

Solutions require solving PDEs over an infinite number of points in space and time.

But this is not possible to compute directly on a computer because:

GComputers can only work with discrete data — finite points and numbers.

How CFD Helps...

CFD bridges the gap by:

Discretizing the continuous equations into a finite form (e.g., using finite volume, finite difference, or finite element methods),

Breaking the domain into small control volumes or grid cells (called meshing),

Approximating the continuous functions and derivatives using numerical methods,

Solving the resulting algebraic equations using iterative solvers.

We need CFD because the fundamental equations governing fluid flow, like the Navier-Stokes equations, are defined in continuous form and cannot be solved analytically for most real-world problems. CFD allows us to discretize these equations, making them solvable using numerical methods on computers.

CFD exists because real fluids follow continuous laws, but computers need discrete data. CFD translates the language of calculus into the language of algorithms.


Friday, August 29, 2025

With a large percentage of AI projects being abandoned, can we say AI is another bubble?

 A large percentage of AI projects are abandoned before reaching full deployment, with failure rates consistently reported between 42% and 95% depending on the context and definition. The most reliable recent figures suggest that 42% of companies scrapped most of their AI initiatives in 2025, while on average, 46% of AI proof-of-concepts are abandoned before reaching production. For generative AI projects, failure rates may be even higher, sometimes reported at 95%.

Key AI Project Abandonment Statistics

  • General AI Projects: 42% of companies abandoned most AI initiatives in 2025—up from 17% in 2024.

  • Proof of Concepts: 46% of AI proof-of-concepts (POCs) are typically abandoned before production.

  • Enterprise Scale: 70–90% of enterprise AI initiatives fail to scale into recurring operations.

  • Generative AI: Up to 95% of business attempts to integrate generative AI reportedly fail.

Is AI in a bubble?

Many experts, data, and market leaders believe the current state of artificial intelligence resembles a classic investment bubble, although there is debate about whether it will crash or evolve into lasting transformation. Extreme valuations, massive venture capital inflows, hype-driven investment behavior, and a high rate of abandoned projects all display warning signs reminiscent of the dot-com bubble era.

Evidence AI Is in a Bubble

  • Major economists and tech CEOs (including Sam Altman of OpenAI) openly say the sector is exhibiting bubble-like traits: funding surpassing fundamentals, valuations detached from business results, and FOMO driving reckless investment.

  • MIT studies show 95% of generative AI business integrations fail, with only a handful of projects delivering meaningful ROI.

  • Hundreds of AI startups achieve “unicorn” status ($1 billion+) despite having no mature products or profits.

  • AI company stock prices now trade at higher price-to-earnings ratios than during the dot-com bubble, said to be “even more unrealistic” than in 2000.

  • Investors poured record-breaking sums into AI startups in 2025, often for companies with limited operational history.

The evidence strongly supports labeling the AI sector as a bubble in 2025, with many similarities to previous tech bubbles—though the ultimate impact will depend on how the industry adapts and matures.

Thursday, August 21, 2025

Surya Siddhanta - The father of modern Trigonometry - my clarion call for the Hindus of Universe - wake up and reclaim your true position in the New World Order...

Come ON... The Hindus of Bharat and the Universe - wake up from the slumber and do justice to your brilliant forefathers...

The TIME is NOW...

No more dilly dally...

No more confusion...

Wake up and reclaim WhoYouAre...

Watch...

The Surya Siddhanta, an ancient Indian astronomical text, is recognized for containing the roots of modern trigonometry. It introduced essential trigonometric functions such as sine (jya), cosine (kojya), and inverse sine (otkram-jya), and is acknowledged for presenting some of the earliest and most accurate trigonometric tables—centuries before similar advancements in Greece or elsewhere.

While Greek mathematician Hipparchus is often called the "father of trigonometry" for compiling early trigonometric tables, modern scholarship suggests that the Surya Siddhanta’s methods predate and outperform those early tables. The text is attributed to Mayasura, and some researchers refer to him as the "father of trigonometry" due to his foundational contributions in defining and applying trigonometric functions within the Surya Siddhanta. The sine tables in Surya Siddhanta, with intervals as fine as 3.75°, were more accurate and comprehensive than those of Hipparchus or Ptolemy, and its methods deeply influenced later Islamic and European mathematics.

The Surya Siddhanta is not just the root of Indian trigonometry, but a reference point for the discipline globally, and Mayasura (author of Surya Siddhanta) is increasingly credited as a true pioneer of trigonometry rather than Hipparchus alone.

Read... O my Hindus of Bharat - we have lost many centuries to mimic the western civilization... No more dilly dally please...

Wake up...

Read... Read...

Sunday, August 17, 2025

What Could Have Been: The Saga of Semiconductor Limited (SCL)...An untold chapter in India's technology dreams...

In the heart of Mohali, far from the global buzz of Silicon Valley, stood a dream.

A dream wrapped in silicon wafers, precision instruments, and the quiet hum of clean rooms — Semiconductor Limited (SCL). It was India's early moonshot into semiconductor self-reliance. Long before "Make in India" and PLI schemes became the rallying cry, SCL was born with a vision to place India on the global semiconductor map.

But this is a story of what could have been.

🧪 The Spark of a Revolution

Founded in the late 1970s and operational by early 1980s, SCL was tasked with designing and fabricating integrated circuits — the very foundation of modern electronics. Unlike most public sector units, SCL wasn’t building dams, laying tracks, or manufacturing steel.

It was building brains — the digital brains of modern machines.

At a time when countries like South Korea and Taiwan were just beginning to formulate their semiconductor strategy, India already had a working fab. Engineers trained abroad came home. Chip design, VLSI, and fabrication—terms alien to most Indians then—were common language within the SCL campus.

There was hope. There was talent. There was purpose.

🔥 The Tragedy: A Fire in the Cleanroom

Then came February 1989 — a date etched in the memory of Indian technologists.

A mysterious fire broke out inside the Class 100 clean room of SCL.

A place that must be cleaner than an operating theatre — where even a speck of dust can ruin a chip — was suddenly engulfed in flames. Equipment worth crores, research worth years, and hope worth a generation was reduced to ashes.

Till date, no conclusive public report explains what happened.

Some said it was an accident. Some whispered sabotage. Others claimed it was negligence.

The timing was eerie. India was just beginning to open up. Global semiconductor giants were eyeing cheap labor and new markets. Was SCL’s rise a threat to someone?

The conspiracy theories remain — but the fire was real.

🧩 The Aftermath: From Dream to Dormancy

After the fire, the project was nationalized under ISRO.

SCL was revived, but its ambition was clipped. It was reoriented to focus on strategic defense and space electronics, making rad-hard chips for satellites and missiles — no longer for the mass market. The dream of a consumer-grade semiconductor ecosystem faded.

Meanwhile, in those same decades:

  • Taiwan built TSMC
  • South Korea backed Samsung
  • China built SMIC
  • India? Had SCL.

🌱 Seeds Never Watered

What if the fire never happened?

What if SCL had received consistent funding and global partnerships?

Would India today be a chip superpower, exporting logic and memory chips, leading 5G infrastructure, or even building advanced GPUs?

The talent was there. The vision was there. But perhaps, the political will wasn't.

We still build great software. We still run backend for the world. But the chip that powers it? It's made elsewhere.

🛠 The Present Echoes

Today, in 2025, the government is trying again — with PLI schemes, DLI initiatives, and a push for fabs in Gujarat and Karnataka. Global players like Micron, Foxconn, and AMD are talking about investing in India.

But buried beneath the headlines is the ghost of SCL, whispering:

“We tried. You ignored.”

🌍 Final Thoughts: History as a Lesson

India's semiconductor saga did not start in 2022.
It began with SCL in the 1980s.

We were not late to the race.
We were there at the starting line.
We just stopped running.

Today, as India dreams of semiconductor glory once again, may we remember SCL — not as a failure, but as a pioneer that laid the first stone, suffered in silence, and warned us of what happens when we forget to protect our dreams.

Because dreams, like wafers, are delicate.
They burn easily.
But their ashes still carry charge.

Thursday, August 14, 2025

The déjà vu - more than 30 years after engineering college - multiplying a vector by exp(jθ) in the complex plane is nothing but rotating it by an angle θ...

It was 1989, a humid afternoon in the engineering college classroom. The blackboard was already half-white from chalk dust, and our mathematics professor — a bespectacled man who loved quoting Euler more than Bollywood — scribbled furiously:

ejθ=cosθ+jsinθe^{j\theta} = \cos\theta + j \sin\theta

"This, my dear students," he declared, "is the key to rotating any vector in the plane. Multiply your vector by ejθe^{j\theta} and watch it turn by θ\theta degrees without changing its length."

At 17 years old, I copied the formula into my notebook without much ceremony. My mind was more occupied with the upcoming electronics lab, the taste of the canteen’s samosa, and the fact that jj here was not the current in Ohm’s law but the mysterious square root of 1-1.

"So," I wondered back then, "why would anyone bother multiplying by such a strange expression instead of using a good old rotation matrix?"

The professor moved on to another topic, the bell rang, and ejθe^{j\theta} quietly slipped into the dusty attic of my mind, along with Laplace transforms and contour integrals.

Fast forward: three decades later

Yesterday my young son, Ridit, said, " Baba, i would like to study the complex number. Because mostly the game engine uses Quaternions for elegantly handling rotation and for that to understand, i need the knowledge of complex algebra".

And then today, after coming back from school, he opened ChatGPT and showed me what he was speaking about - and I was astonished - yes... this is the case - and my mind took me more than 30 years ago, when my engineering college professor taught me this.

I totally forgot...

But NOW... i remember everything.

In the glow of a laptop screen, with Python code dancing across the terminal, I was plotting a simple 2D rotation. I tried the matrix way — it worked, as always.

Then i used...

z *= np.exp(1j * theta)

And there it was — the vector spun, clean and elegant, no sine or cosine in sight. A 30-year-old chalkboard came rushing back. My professor’s voice, muffled by time, echoed:

"Multiply by ejθe^{j\theta} and it rotates."

I finally felt the truth of it — the way Euler’s formula hides geometry inside algebra, the way the complex exponential is not just maths trickery but a perfect rotation operator.

The déjà vu

I sat back and smiled. In engineering college, it was just a formula to memorize. Three decades later, it was like meeting an old classmate and realizing they’d been brilliant all along.

The same equation, the same ejθe^{j\theta}, but now it wasn’t an exam answer — it was an elegant, almost poetic bridge between numbers and motion.

And somewhere, in some cosmic complex plane, I imagined my younger self and older self standing at the same point, separated by an angle θ\theta of 30 years, both connected by the same exponential arc.

Here's the python code for experimentation - visualising that multiplying by rotation matrix and by exp(jθ) produce the same effect.

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation

# Initial vector
x0, y0 = 1, 0.5
z0 = x0 + 1j * y0 # complex form

# Rotation speed
theta = np.pi / 60
frames = 120

# Rotation matrix
R = np.array([[np.cos(theta), -np.sin(theta)],
[np.sin(theta), np.cos(theta)]])

# Set up figure
fig, axes = plt.subplots(1, 2, figsize=(10, 5))
titles = ["Rotation via e^(jθ)", "Rotation via Matrix"]
plots = []

for ax, title in zip(axes, titles):
ax.set_xlim(-2, 2)
ax.set_ylim(-2, 2)
ax.set_aspect('equal', adjustable='box')
ax.axhline(0, color='gray', linewidth=0.5)
ax.axvline(0, color='gray', linewidth=0.5)
ax.set_title(title)
plots.append(ax.plot([], [], 'ro-', lw=2)[0])

# State variables
z = z0
v = np.array([x0, y0])


# Update function
def update(frame):
global z, v
# Complex method
plots[0].set_data([0, z.real], [0, z.imag])
z *= np.exp(1j * theta)

# Matrix method
plots[1].set_data([0, v[0]], [0, v[1]])
v = R @ v

return plots


# Animate
ani = FuncAnimation(fig, update, frames=frames, interval=50, blit=True)
plt.show()

And here's the screen recording of the above code.


Mathematics from decades ago can surprise you when it comes alive again on your screen.

When you teach a person, actually two people learn - here i am delving into calculus to show the light to my son...

1. The Problem

We have:

limx2x24x2\lim_{x \to 2} \frac{x^2 - 4}{x - 2}

If we try direct substitution (x=2x = 2):

(2)2422=440=00\frac{(2)^2 - 4}{2 - 2} = \frac{4 - 4}{0} = \frac{0}{0}

This is an indeterminate form — so the limit is not obvious.


Why it’s a Removable Discontinuity

The numerator x24x^2 - 4 factors:

x24=(x2)(x+2)x^2 - 4 = (x - 2)(x + 2)

So:

x24x2=(x2)(x+2)x2\frac{x^2 - 4}{x - 2} = \frac{(x - 2)(x + 2)}{x - 2}

For x2x \neq 2, the (x2)(x - 2) cancels:

x24x2=x+2\frac{x^2 - 4}{x - 2} = x + 2

The function behaves exactly like y=x+2y = x + 2 everywhere except at x=2x = 2.

At x=2x = 2, the original expression was undefined (division by zero), so there’s a hole in the graph — that’s the removable discontinuity.


Finding the Limit

Now that it’s simplified:

limx2x24x2=limx2(x+2)\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = \lim_{x \to 2} (x + 2)






=2+2=4
= 2 + 2 = 4

So:

The limit is 4\boxed{\text{The limit is } 4}

If we define f(2)=4f(2) = 4, the discontinuity disappears and the function becomes continuous.


Visualizing

If you graph y=x24x2y = \frac{x^2 - 4}{x - 2}:

  • It looks like a straight line y=x+2y = x + 2

  • Except there’s an open circle at (2,4)(2, 4)
    That hole is the removable discontinuity.

Here's a visual representation of f(x).

The left top (the first one) shows the f(x) plotted.



Now let’s walk through L’Hôpital’s Theorem for limits clearly and step-by-step.


The Problem L’Hôpital Solves

Sometimes, when evaluating a limit, direct substitution gives an indeterminate form like:

  • 00\frac{0}{0}

  • \frac{\infty}{\infty}

These forms mean you can’t just plug in the value — but the limit might still exist.

Example:

limx2x24x2\lim_{x \to 2} \frac{x^2 - 4}{x - 2}

Direct substitution → 0/00/0.


Statement of L’Hôpital’s Rule

If:

  1. limxaf(x)=0\lim_{x \to a} f(x) = 0 and limxag(x)=0\lim_{x \to a} g(x) = 0
    OR
    limxaf(x)=±\lim_{x \to a} f(x) = \pm\infty and limxag(x)=±\lim_{x \to a} g(x) = \pm\infty

  2. ff and gg are differentiable near aa (except possibly at aa)

  3. g(x)0g'(x) \neq 0 near aa

Then:

limxaf(x)g(x)=limxaf(x)g(x)\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}

provided the limit on the right exists or is ±\pm\infty.


How It Works (Example)

Example:

limx2x24x2\lim_{x \to 2} \frac{x^2 - 4}{x - 2}

Direct substitution → 0/00/0.

Step 1: Differentiate numerator and denominator separately:

f(x)=2x,g(x)=1f'(x) = 2x, \quad g'(x) = 1

Step 2: Apply L’Hôpital’s Rule:

limx22x1=2(2)=4\lim_{x \to 2} \frac{2x}{1} = 2(2) = 4

Same answer we got earlier by factoring — but L’Hôpital works even when factoring is messy.


Another Example with /\infty/\infty

limx3x2+5x7x24\lim_{x \to \infty} \frac{3x^2 + 5x}{7x^2 - 4}

Direct substitution → /\infty/\infty.

Differentiate top and bottom:

f(x)=6x+5,g(x)=14xf'(x) = 6x + 5,\quad g'(x) = 14x

Now:

limx6x+514x=limx6+5x14=614=37\lim_{x \to \infty} \frac{6x + 5}{14x} = \lim_{x \to \infty} \frac{6 + \frac{5}{x}}{14} = \frac{6}{14} = \frac{3}{7}

Notes and Common Mistakes

  • Only use when you get 0/00/0 or /\infty/\infty
    (For other indeterminate forms like 00 \cdot \infty, 11^\infty, \infty - \infty, you may first need algebraic manipulation.)

  • Apply the rule repeatedly if the first derivative still gives 0/00/0 or /\infty/\infty.

  • Remember: Differentiate top and bottom separately, never use the quotient rule here.


2. The Problem

Alright — let’s go step-by-step for

limx0sinxx\lim_{x \to 0} \frac{\sin x}{x}

Direct Substitution Check

If x=0x = 0,

sin(0)0=00\frac{\sin(0)}{0} = \frac{0}{0}

That’s an indeterminate form — so we need another method.

\lim_{x \to 0} \frac{\sin x}{x} = 1

Using L’Hôpital’s Rule

We have 0/00/0 form. Differentiate top and bottom:

limx0cosx1=cos0=1

Final Answer:

                                                                        1

Visualization


See the plot at left column second from top.

3 . The problem

limx01x\lim_{x \to 0} \frac{1}{x}


First observation

If x=0x = 0, the expression is undefined because we can’t divide by zero.
So we check left-hand limit (LHL) and right-hand limit (RHL) separately.


Right-hand limit ( x0+x \to 0^+ )

Take xx as small positive numbers:

xx 1/x1/x
0.1 10
0.01 100
0.001 1000

As x0+x \to 0^+, 1/x+1/x \to +\infty.


Left-hand limit ( x0x \to 0^- )

Take xx as small negative numbers:

xx 1/x1/x
-0.1 -10
-0.01 -100
-0.001 -1000

As x0x \to 0^-, 1/x1/x \to -\infty.


Conclusion

The two one-sided limits are not equal:

limx0+1x=+\lim_{x \to 0^+} \frac{1}{x} = +\infty limx01x=\lim_{x \to 0^-} \frac{1}{x} = -\infty

Since they differ, the two-sided limit does not exist.


📌 Important: This is an example of an infinite discontinuity.

This is the third graph in the image attached earlier.

4. The problem - Jump Discontinuity

f(x)={1x<02x0

Visualization:

A step function shows a sudden jump — perfect for illustrating discontinuity.

The topmost in the right column of the image attached earlier


4. The Problem

The limit of

limx0sin(1x)\lim_{x \to 0} \sin\left(\frac{1}{x}\right)

is a classic example of a limit that does not exist.


Why it doesn’t exist

As x0x \to 0,

  • 1x+\frac{1}{x} \to +\infty when x0+x \to 0^+

  • 1x\frac{1}{x} \to -\infty when x0x \to 0^-

The sine function sin(t)\sin(t) oscillates between -1 and +1 infinitely often as t±t \to \pm \infty.

So near x=0x=0, sin(1x)\sin\left(\frac{1}{x}\right) oscillates wildly — no single number is approached.


Formal reasoning

We can try to take the right-hand limit:

Pick sequences:

xn=12πnsin(1xn)=sin(2πn)=0x_n = \frac{1}{2\pi n} \quad \Rightarrow \quad \sin\left(\frac{1}{x_n}\right) = \sin(2\pi n) = 0

and

yn=12πn+π/2sin(1yn)=sin(2πn+π2)=1y_n = \frac{1}{2\pi n + \pi/2} \quad \Rightarrow \quad \sin\left(\frac{1}{y_n}\right) = \sin\left(2\pi n + \frac{\pi}{2}\right) = 1

Both xn0x_n \to 0 and yn0y_n \to 0, but the function values approach different limits (0 and 1).
Hence, the limit does not exist.

5. The problem

Alright, let’s check if your function is continuous at x=1x = 1.

Given:

f(x)={x21if x<12if x=13xif x>1f(x) = \begin{cases} x^2 - 1 & \text{if } x < 1 \\ 2 & \text{if } x = 1 \\ 3 - x & \text{if } x > 1 \end{cases}

Step 1 – Left-hand limit (as x1x \to 1^-)

For x<1x < 1, f(x)=x21f(x) = x^2 - 1

limx1f(x)=121=0\lim_{x \to 1^-} f(x) = 1^2 - 1 = 0

Step 2 – Right-hand limit (as x1+x \to 1^+)

For x>1x > 1, f(x)=3xf(x) = 3 - x

limx1+f(x)=31=2\lim_{x \to 1^+} f(x) = 3 - 1 = 2

Step 3 – Compare limits

  • Left-hand limit = 0

  • Right-hand limit = 2
    Since 020 \neq 2, the limit at x=1x = 1 does not exist.


Step 4 – Conclusion

Continuity at x=1x = 1 requires:

limx1f(x)=f(1)\lim_{x \to 1} f(x) = f(1)

But here:

  • The two one-sided limits are not equal

  • So the function has a jump discontinuity at x=1x = 1

Final Answer:Not continuous at x=1x = 1.

Visualization

The bottom of the left column shows the graphical output of the function


6. The Problem

Let’s check step-by-step whether

f(x)={xsin(1x),x00,x=0f(x) = \begin{cases} x \sin\left(\frac{1}{x}\right), & x \neq 0 \\ 0, & x = 0 \end{cases}

is continuous at x=0x = 0.


Step 1: Continuity definition at a point

A function ff is continuous at x=0x = 0 if:

limx0f(x)=f(0)\lim_{x \to 0} f(x) = f(0)

That means:

  1. f(0)f(0) exists ✅

  2. The limit limx0f(x)\lim_{x \to 0} f(x) exists

  3. They are equal


Step 2: Check f(0)f(0)

From the definition:

f(0)=0f(0) = 0

Step 3: Find limx0f(x)\lim_{x \to 0} f(x)

When x0x \neq 0:

f(x)=xsin(1x)f(x) = x \sin\left(\frac{1}{x}\right)

We know that:

1sin(1x)1-1 \leq \sin\left(\frac{1}{x}\right) \leq 1

Multiplying through by xx (near x=0x=0):

xxsin(1x)x- |x| \leq x \sin\left(\frac{1}{x}\right) \leq |x|

Step 4: Apply the Squeeze Theorem

As x0x \to 0:

x0andx0- |x| \to 0 \quad \text{and} \quad |x| \to 0

So:

limx0xsin(1x)=0\lim_{x \to 0} x \sin\left(\frac{1}{x}\right) = 0

Step 5: Compare with f(0)f(0)

We have:

limx0f(x)=0=f(0)\lim_{x \to 0} f(x) = 0 = f(0)

Therefore, f(x)f(x) is continuous at x=0x = 0.

Visualisation



The squeeze theorem

The Squeeze Theorem (also called the Sandwich Theorem or Pinching Theorem) is a method in calculus for finding the limit of a function by “trapping” it between two simpler functions whose limits are known and equal.


Definition

If for all xx near aa (except possibly at aa itself), we have

g(x)f(x)h(x)g(x) \leq f(x) \leq h(x)

and

limxag(x)=Landlimxah(x)=L\lim_{x \to a} g(x) = L \quad \text{and} \quad \lim_{x \to a} h(x) = L

then

limxaf(x)=L\lim_{x \to a} f(x) = L

Intuition

Think of it like this:
If you trap f(x)f(x) between g(x)g(x) and h(x)h(x), and both of those are “squeezing” toward the same value LL as xx approaches aa, then f(x)f(x) must be squeezed to LL as well.


Example

Let’s prove:

limx0xsin(1x)=0\lim_{x \to 0} x \sin\left(\frac{1}{x}\right) = 0

We know:

1sin(1x)1-1 \leq \sin\left(\frac{1}{x}\right) \leq 1

Multiply all sides by x|x|:

xxsin(1x)x-|x| \leq x \sin\left(\frac{1}{x}\right) \leq |x|

As x0x \to 0:

limx0x=0andlimx0x=0\lim_{x \to 0} -|x| = 0 \quad\text{and}\quad \lim_{x \to 0} |x| = 0

By the Squeeze Theorem:

limx0xsin(1x)=0