By David De La Torre, MIT ‘27
Over Summer 2025 I had the privilege of building the minimal viable product (MVP) for Algebra Flow, a mobile algebra trainer that offers step by step solutions. The idea for Algebra Flow came to life during Joe Zurier’s (MIT ‘19) time as a physics tutor at a Cambridge high school. He was disappointed that the majority of issues his students faced were due to foundational issues with algebra as opposed to actual physics. He figured an algebra trainer would help his students and selected me to make an MVP that can help with this real world issue.
The first question that might come to mind is how is this app different from other math learning apps on the web and app store. For one, all math learning apps we could find only offered course-style algebra teaching with limited problems. For example Khan Academy offers algebra courses where the user can go through each unit and solve a set number of problems. Algebra Flow is different in that the app serves more as a trainer for students who already have some familiarity with algebra but that would benefit from uncapped practice, which we believe would help them learn to truly problem solve as opposed to memorizing a series of textbook steps (which fail on harder problems found in physics courses). The other focus is on offering students step by step solutions for when they can’t quite crack a problem. Current step-by-step solvers are primarily served to users as a calculator first product (i.e wolfram alpha), which is unintuitive for students who are looking for more of a trainer. More importantly, all step-by-step solvers we could find either require a paid subscription, or are riddled with advertisements. Algebra Flow, is unique because it’s a free (+ad free), algebra trainer with uncapped step-by-step solutions. It was easy for me to see that this idea could make a positive impact, and I’m very grateful that Joe chose me to bring the MVP to life over Summer 2025.
Initially, I considered that it might be possible to build our own symbolic algebra solver. There currently is no public code for step-by-step solutions that is to the level we needed. The only one that came close was Google’s mathsteps, however the support for problems that could be solved were quite limited and below what we needed for tougher problems. Building a step by step algebra solver becomes increasingly complex when you realize that for a learning app, you also need english comments that explain the steps being taken.
Given these concerns, I considered how I could achieve the same result with large language models (LLMs). Instead of algorithmically generating problems and then building a step-by-step solver, I could instead have an LLM generate problems and then also write the steps to solve them. The first concerns with this idea were accuracy and costs. At the time of development OpenAI’s o3 and Google’s Gemini 2.5 pro were the leading models, and during testing they were excellent at generating and solving algebra problems even when the problems were very difficult (relative to high school). The downside of this was the cost and generation time, the models were expensive and slow. On the other side, faster models like OpenAI’s 4o-mini could generate problems but often produced errors in solutions. The sweet spot I settled on was OpenAI’s o4-mini (yes, OAI’s naming is pretty confusing), a chain of thought reasoning model that is optimized to be cost-efficient.
In my testing, this model was able to generate 100 problems with solutions for just $0.50-0.60 without any errors. In the extreme case assuming our most active user solves 100 problems a day (quite unlikely given the difficulty of some of the hard problems), we can generate 100 problems each day and serve them to our users for a monthly cost of $19 in the worst case.
In the unforeseen scenario that a user solves all of the days problems, the app can seamlessly fall back to the previous days batch. As models improve the trend is that response costs significantly decrease by year. Given the accuracy, and low cost I chose to run with this strategy as opposed to building my own solver.
An example of an easy simplification problem and solution generated by o4-mini.
With this out of the way, the core user loop seemed to be: Generate Batch —> Upload Batch —> User downloads Batch —> User can solve problems within the batch without any further internet connection beyond the initial sync.
Given that I would be the sole developer for this project (with a small timeframe) I chose to develop Algebra Flow with React Native (with Expo). Expo allows you to use a single codebase for iOS, Android, and web, which saved time and allowed me to focus on the app rather than xcode/android studio. The core app flow also seemed simple enough to where I wouldn’t need to write custom native code, so Expo was locked in.
As for generating the problems I settled on the aforementioned o4-mini from OpenAI. I chose to store the problems in a AWS S3 bucket, which is extremely cheap, currently free, for our batch sizes (143kb/batch). To initiate problem generation I wrote a Github Actions script in yaml which calls on OAI to generate problems, and then uploads them to our S3 bucket.