Skip to content

[RFC]: Add functions for numerical integration and differentiation #122

@sahilk45

Description

@sahilk45

Full name

SAHIL KUMAR

University status

Yes

University name

UIET, Chandigarh, Panjab University

University program

B.E. in Information Technology

Expected graduation

2027

Short biography

I am second-year B.E.(Bachelor's of Engineering) student at the University Institute of Engineering and Technology(UIET), Chandigarh ,Panjab University. Doing major in Informaton Technology(IT). I am Reliance Foundation Scholar. Academically, I have 9.15 CGPA . I am actively involved with Pclub, the programming club at UIET.

Since my first year, I have been deeply interested in software development, consistently expanding my technical skills and exploring various programming domains. My academic curriculum has provided me with strong programming foundations in C Language, C++ (OOPs), Python, DBMS,OS, and Computer Architecture.

My technical skills encompass a comprehensive web development stack including HTML, CSS, JavaScript, Tailwind, React.js, Next.js, Express.js, and database technologies like MongoDB, Firebase, and SQL.
Hackathons in which i participated were transformative experiences like:

  • FOSS Hack 2025 (Open Source)
  • Hack with India (By Google)
  • Technoxian at PEC Chandigarh

I have extensively practiced Data Structures and Algorithms, reaching expert levels on platforms like Coding Ninjas and LeetCode, which demonstrates my strong problem-solving capabilities and computational thinking skills.

My interests lie in web development, open-source contributions, algorithmic problem-solving, and exploring emerging technological domains with a keen focus on creating innovative and efficient software solutions.

Timezone

Indian Standard Time ( IST ), UTC+5:30

Contact details

email:[email protected], github:sahilk45

Platform

Windows

Editor

I prefer VS code because it is a lightweight yet powerful source code editor that offers an unparalleled coding experience. With its powerful intellisense, built-in Git integration, extensive plugin ecosystem, and cross-platform support, VS Code transforms complex coding tasks into seamless, enjoyable workflows. Also, it has extensive language support.

Programming experience

In first-year of college i started with strong programming foundations in C Language, C++ (OOPs), Python. Later i got interset in development, and in web development i worken upon HTML, CSS, JavaScript, Tailwind, React.js, Next.js, Express.js, and database technologies like MongoDB, Firebase, and SQL as my tech stack.
I likes to follow the project-based learning approach. Here are few of my projects:

  • Workout Generator : It is a comprehensive fitness web application built with Next.js. It empowers users to manage workouts, track progress, and access a diverse library of exercises, offering a seamless and intuitive fitness management experience for free.
  • Password Manager : It is web application where you can manage all your passwords at one place. It uses react and express for backend, which will save your passwords with help of mongodb database.
  • Yours Spotify : It is a web application which is a personal gateway to endless music ,built from scratch. It was from one of my beginning project using javaScript concepts.

There are other small projects as well which helped me learned about web-development

JavaScript experience

My JavaScript journey has been an exciting exploration of web development, from building Yours spotify to mastering core language concepts. I have also used JavaScript for frontend development using frameworks like React and Next.js.

Favorite feature: JavaScript's closure mechanism stands out as my favorite feature, it is like a superpower that allows functions to remember and access their original context, enabling sophisticated programming patterns.
For the stdlib numerical integration and differentiation project, my deep JavaScript knowledge becomes a significant asset. The ability to create flexible, high-performance mathematical functions aligns perfectly with my experience in developing complex features

Least Favorite Feature: JavaScript's type coercion can be both a blessing and a challenge. While it provides flexibility, it can also introduce subtle bugs if not handled carefully. The language's loose typing means that unexpected type conversions can occur, which requires developers to be extremely vigilant about type checking and explicit conversions..

Node.js experience

After JavaScript, I then got to learn about Node.js which helped me a lot in my projects journey.

My Node.js experience has been instrumental in building strong backend applications, leveraging its non-blocking, event-driven architecture to create scalable web solutions. I've utilized Node.js with Express.js to develop RESTful APIs, handle server-side logic, and integrate seamlessly with databases like MongoDB and Firebase.

From managing complex server interactions to implementing backend logic for web applications, Node.js has been a powerful tool in my development toolkit. Its ecosystem of npm packages and ability to bridge frontend and backend technologies makes it an incredibly versatile platform for modern web development.

C/Fortran experience

C was my first programming language that i learned in my first semester of college. There I developed a comprehensive understanding of the language's fundamental concepts. From basic syntax and control structures to advanced topics like pointers, memory management, and dynamic memory allocation, I systematically explored the core principles of procedural programming.

My curriculum not only taught me the syntax but also instilled crucial programming disciplines like code organization, logical problem-solving, and understanding low-level computer operations.

I do not have experience with Fortran, but if needed anywhere in my project, I am ready to learn it!

Interest in stdlib

stdlib attracts me as a groundbreaking standard library that transforms JavaScript from a web scripting language into a powerful computational toolkit for scientific and numerical computing. What fascinates me most is its ambitious vision of creating a comprehensive, high-performance library that bridges the gap between JavaScript and traditional scientific computing environments like MATLAB or SciPy.

What sets stdlib apart is its modular architecture, allowing developers to use individual packages independently. This approach not only makes the library incredibly flexible but also represents a modern, innovative approach to software design.

I really liked the practical type experience it offers. stdlib is a special library for me as it is one of my first open-source organisation. The people working here are extremely helpful. Also Gitter platform is very interactive and supportive for all types of doubts by contributors.

It is an opportunity to be part of a project that could fundamentally change how developers approach scientific computing in JavaScript.

Version control

Yes

Contributions to stdlib

After forking the repository and setting it up locally, I began by carefully exploring the existing codebase and identifying potential areas for enhancement.
I've been working through the project's issues, focusing on understanding the library's architecture and contribution guidelines. My contributions have included:

  • Thoroughly testing existing library functions
  • Identifying potential improvements
  • Opening targeted issues that highlight specific areas for development
  • Preparing pull requests that address specific technical challenges
  1. Merged PRs
  2. Open PRs
  3. Issues

My goal has been to show not just technical proficiency, but a genuine commitment to improving the stdlib ecosystem. Each interaction is an opportunity to learn and contribute meaningfully to this innovative scientific computing library.

stdlib showcase

It is in progress...

Goals

### Project Abstract: Advancing Numerical Computation in JavaScript through Robust Integration and Differentiation Functions. issue:#24

My goal is to significantly enhance stdlib's computational capabilities by developing a comprehensive suite of numerical integration and differentiation functions. This project aims to transform JavaScript from a primarily web-oriented language into a powerful platform for scientific computing by implementing high-precision mathematical algorithms.

The core objective is to create a collection of flexible, performant functions that serve as fundamental building blocks for advanced computational tasks. By carefully studying reference implementations from scientific computing libraries like SciPy, I will develop JavaScript functions that can:

  • Perform precise numerical integration across various computational scenarios
  • Implement multiple differentiation techniques with high accuracy
  • Provide adaptive and robust algorithmic approaches for mathematical computations
  • Ensure compatibility and extensibility within the stdlib ecosystem

Key implementation strategies include:

  • Analyzing existing permissively licensed implementations in C
  • Developing algorithms that balance computational efficiency and numerical stability
  • Creating comprehensive test suites to validate mathematical accuracy
  • Designing an intuitive, flexible API for researchers and developers

By focusing on numerical integration and differentiation techniques, the project will provide stdlib with crucial mathematical primitives that can support complex computational research, data analysis, and scientific modeling across various domains.

Why this project?

What truly excites me about this numerical integration and differentiation project is the opportunity to bridge two worlds I'm passionate about: web development and mathematics. Working at this intersection represents a perfect fusion of my technical interests. Mats is always has a logic and gives the exact answer for everything it has, which I likes the most.

JavaScript has revolutionized web development, but its potential for scientific computing remains largely untapped. I'm thrilled by the challenge of transforming JavaScript from a language primarily associated with web interfaces into a powerful tool for complex mathematical computations. This project isn't just about writing code ,it's about expanding the boundaries of what JavaScript can accomplish.

Scientists, researchers, and developers who are comfortable with JavaScript,C will gain access to powerful mathematical capabilities without needing to learn specialized languages.

Also, I am enthusiastic about contributing to an open-source project with such a clear vision. stdlib's mission to create a comprehensive standard library for JavaScript aligns perfectly with my belief in expanding access to powerful computational tools.

Qualifications

My qualifications for this numerical integration and differentiation project stem from a strong academic foundation in calculus and differential equations. During my first semester, I studied calculus from Erwin Kreyszig's Advanced Engineering Mathematics, gaining deep insights into integration techniques, limits, derivatives, and their applications in solving real-world problems.

My second semester expanded this knowledge through rigorous study of differential equations and transforms, utilizing both Kreyszig's text and B.V. Ramana's Higher Engineering Mathematics. This coursework provided me with a thorough understanding of ordinary and partial differential equations, numerical methods for solving complex equations, and various transform techniques that are directly applicable to numerical integration and differentiation functions.

This mathematical background is complemented by my programming expertise in JavaScript and Node.js, creating a perfect combination of skills for this project.

Also, there is something really satisfying about writing code that makes benefits to community.

Prior art

Numerical integration and differentiation methods have a rich history of implementation across various programming languages and libraries, with significant developments in scientific computing ecosystems outside of JavaScript.

  1. The SciPy library for Python offers one of the most comprehensive implementations of numerical methods for integration and differentiation. Its scipy.integrate module provides strong algorithms for numerical integration,ordinary differential equation (ODE) solvers, and specialized integrators for specific types of problems. Similarly, its numerical differentiation capabilities include various finite difference methods with adjustable accuracy. SciPy's implementation is particularly noteworthy for its balance between computational efficiency and numerical stability.
  2. In the C/C++ world, the GNU Scientific Library (GSL) provides extensive implementations of numerical integration techniques, including adaptive quadrature methods like Gauss-Kronrod and various ODE solvers.
  3. The QUADPACK library, originally written in FORTRAN, has been a foundation for many numerical integration implementations across languages.
  4. The MATLAB and Octave environments offer built-in functions for numerical integration and differentiation, including adaptive quadrature methods and ODE solvers, which have been extensively optimized and tested for accuracy and performance.
  5. Within the JavaScript ecosystem, the scijs community has made notable progress with implementations like ode45-cash-karp, which implements the Cash-Karp method for solving ordinary differential equations.
    This is also mentioned by @Planeshifter sir in the idea of ths issue.
    This work demonstrates that sophisticated numerical methods can be effectively implemented in JavaScript, though the ecosystem remains less developed compared to Python or C/C++.

These existing implementations and academic works provide valuable reference points for developing strong numerical functions in stdlib, allowing us to build upon established algorithmic approaches while adapting them to JavaScript's unique characteristics and performance considerations.

Commitment

I plan to invest substantial time in this project to ensure its success, with a clear commitment structure before, during, and after the Google Summer of Code program.

  • Before GSoC (Community Bonding): ~10 hrs/week – Engaging with the community, setting up the dev environment, Researching numerical integration and differentiation algorithms and Analyzing reference implementations in SciPy and scijs.
  • During GSoC (Coding Period): ~30 hrs/week – Implementing features, attending mentor meetings, and working and refining the project.
  • After GSoC: ~5 hrs/week – Addressing feedback or remining issues, documentation, and community support.

My academic calendar aligns well with the GSoC timeline, as my semester exams will conclude before the coding period begins. I have no planned vacations or competing commitments during the summer that would interfere with my GSoC work. My summer is intentionally cleared to focus on this project.

Schedule

Assuming a 12 week schedule,

Community Bonding Period:

  • Thorough study of stdlib codebase and contribution guidelines
  • Research on numerical integration/differentiation algorithms
  • Set up development environment and testing frameworks
  • Initial meetings with mentors to refine project scope

Week 1-2: Foundation and API Design:

  • Collaborate with mentors to sketch the API design
  • Create proof-of-concept implementations for key algorithms
  • Develop initial interface specifications for integration/differentiation functions
  • Ensure API consistency across different numerical methods
  • Deliverable: Documented API design and simple POC implementations

Week 3-4: Basic Integration Methods and API Refinement:

  • Implement trapezoidal rule and Simpson's rule within the agreed API framework
  • Test API usability with simple use cases
  • Refine API based on practical implementation experience
  • Deliverable: Working implementation of basic integration methods with coherent API

Week 5-6: Advanced Integration and Extended Features:

  • Implement adaptive quadrature methods
  • Design extensions for specialized cases (e.g., improper integrals)
  • Create consistent pattern for options and configurations
  • Deliverable: Comprehensive integration suite with consistent API design

Week 7-8: Differentiation Methods:

  • Implement various differentiation techniques
  • Maintain API consistency between integration and differentiation functions
  • Address edge cases and error handling consistently
  • Deliverable: Complete differentiation module with documentation

Week 9-10: ODE Solvers and Extended Features:

  • Implement ODE solvers with consistent interface
  • Design and implement extensions like Poincaré maps
  • Create flexible stopping criteria framework
  • Optimize method selection based on problem characteristics
  • Deliverable: ODE solver suite with extended features

Week 11-12: Finalization and Documentation:

  • Perform API usability review across all implementations
  • Create comprehensive usage examples

Final Week:

  • Develop thorough documentation highlighting API patterns
  • Final testing and refinement
  • Deliverable: Production-ready numerical functions with developer-friendly API

Notes:

  • The community bonding period is a 3 week period built into GSoC to help you get to know the project community and participate in project discussion. This is an opportunity for you to setup your local development environment, learn how the project's source control works, refine your project plan, read any necessary documentation, and otherwise prepare to execute on your project project proposal.
  • Usually, even week 1 deliverables include some code.
  • By week 6, you need enough done at this point for your mentor to evaluate your progress and pass you. Usually, you want to be a bit more than halfway done.
  • By week 11, you may want to "code freeze" and focus on completing any tests and/or documentation.
  • During the final week, you'll be submitting your project.

Related issues

Issue:#24

Checklist

  • I have read and understood the Code of Conduct.
  • I have read and understood the application materials found in this repository.
  • I understand that plagiarism will not be tolerated, and I have authored this application in my own words.
  • I have read and understood the patch requirement which is necessary for my application to be considered for acceptance.
  • I have read and understood the stdlib showcase requirement which is necessary for my application to be considered for acceptance.
  • The issue name begins with [RFC]: and succinctly describes your proposal.
  • I understand that, in order to apply to be a GSoC contributor, I must submit my final application to https://summerofcode.withgoogle.com/ before the submission deadline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    20252025 GSoC proposal.received feedbackA proposal which has received feedback.rfcProject proposal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions