Numerical Methods Project

Numerical methods provide a way to compute (approximate) values of solutions to differential equations, even when we cannot solve the equations exactly.  The drawback is the large number of numerical calculations required to obtain a desired value and level of precision.  In this project, you will use technology to implement the various numerical methods and use your technological solution to solve differential equations problems.

Be sure to read all the information below, including:

  • Project Instructions
  • Technology Options
  • Project Requirements

Project Instructions

(Parts I-IV due Monday, April 1st, 2024)  Use technology to compute approximate solutions to your assigned initial value problem using Euler’s Method, the Improved Euler’s Method, and the Runge-Kutta Method.

Initial Value Problem. Your project will be based on the initial value problem provided in the WeBWorK assignment Numerical Methods Project.

Part I: Use technology (see “Technology Options” below) to approximate the solution to your Initial Value Problem using Euler’s Method, the Improved Euler’s Method, and the Runge-Kutta Method. See “Project Requirements” below for more details.

Part II. Find the exact solution $y(x)$ to the Initial Value Problem and use it to determine the value requested in the problem. Round your answer to 8 decimal places.
Type or write your answer to this part and submit it with your project. Show all work.

Part III. Compare the exact value obtained in Part II to the three numerical approximations obtained in Part I. How many correct decimal digits did each method produce? Which method was the most accurate?
Type or write your answer to this part and submit it with your project.

Part IV. Reflection.  Write one or two paragraphs (minimum 300 words) responding to the following.  Leave your response to this part as a comment on this post.

  1. Describe your project and how it works.
  2. Describe the process of building your numerical methods calculator.  What kind of technology did you decide to use, and why? Did you encounter any unexpected challenges in completing this project?
  3. Why do we need numerical methods in addition to the other methods studied in the class?
  4. Why is this assignment included in the class (instead of just computing the various methods using a calculator)?
  5. Please include a link to your project (if it is online), or clearly state that you will be sending me the files by email (and don’t forget to do it!).

Technology Options

You can choose your technology tool for this job – use any one of the following:

  1. a spreadsheet (Excel, Google Sheets, or other spreadsheet)
    • if you choose to create a spreadsheet, you should have columns for$x, y, f(x,y)$ , and so on, and each stage should appear in its own row (See Project Requirements below for more details)
    • HOW TO SUBMIT: If your project is a spreadsheet, either share it with me (if it is in Google Sheets or a similar cloud-based platform), or email the file to me as an attachment.
  2. a programming language (Java, Perl, or other programming language)
    • if you choose to write code, your program should output the values of $x, y, f(x,y)$ and so on at each stage (See Project Requirements below for more details)
    • HOW TO SUBMIT: If your project is code, please submit it using an online coding site like ideone.com – once your code is working on the site, you can simply submit a link.  If you are using a programming language not supported by ideone.com, you can email the source code to me (for Python, try this site).
  3. mathematical software (MatLab, Maple, Mathematica, or other mathematical software)
    • if you choose to use mathematical software, your program should output the values of $x, y, f(x,y)$ and so on at each stage (See Project Requirements below for more details)
    • HOW TO SUBMIT: If your project uses mathematical software, either share it with me (if it is in MatLab Online or a similar cloud-based platform), or email the file to me as an attachment.

Project Requirements

  • Your solution must be able to carry out Euler’s Method, Improved Euler’s Method, and Runge-Kutta (you may implement these as three separate spreadsheets or programs if you wish).
  • Your solution should display all the points $(x,y)$ found along the way, not just the final point.
  • Your solution should also display other values found while carrying out each method:
    • Euler’s Method: display the slope $f(x,y)$ at each stage
    • Improved Euler’s: display the values of $k1, k2$ at each stage
    • Runge-Kutta: display the values of $k1, k2, k3, k4$ at each stage
    • You can display other values as well, if you wish (for example, the intermediate y-value in the Improved Euler method that we refer to as $z$).
  • Your solution may NOT use any built-in version of these methods (for example, most mathematical software contains a built-in command for Euler’s Method – you can use this to check your work, but you need to create your own solution).

Test Your Project

Test your project.  Data for the first few stages of calculation using each method can be found in WeBWorK.

30 Comments

  1. Randy Mojum

    The technology I used for my project’s calculators was Java code, and it allowed me to approximate the target value through the use of three different methods. The first calculator I wrote in code was the Euler’s Method calculator. This is where I created a main method were then a class and stated my initial conditions which were the given x0 and y0 values, h value, and final value. Next, I would print in the console, using the system out print line statement to have a user interface that explains which type of method that is being used, the initial conditions, the step size, and the final value. After that, I created a while loop that would start at 0 and create an iteration for “i” or each of the steps involved in calculating each y value until the target final value is reached. The slope will also be displayed using a formula to calculate the slope (calculatedSlope) by plugging in values for x and y in the original equation (8x – 8y). The same process was repeated for creating each calculator including Improved Euler’s Method, and Runge-Kutta Method. When creating the other calculators, the only part that changes lie within the while loop because we are introducing new variables with different formulas to calculate them. Each of these data types were stated as doubles because we wanted to yield the most accurate decimal approximation. The Runge-Kutta Method included the intermediate y-values and using the formula y = y + h * ((k1 + 2 * k2 + 2 * k3 + k4) / 6) to calculate each new y. In the end I found that the Runge-Kutta Method was the most accurate with 3 decimal digits matching the exact solution.

    When completing this project, there were not any significant challenges, but organization of each variable with its corresponding formula was critical because one formula missing a number, or a letter could throw off the projected results. We need numerical methods in addition to the other methods studied in the class because we want the most accurate results generated while also reducing the time it takes to solve a problem that has numerous steps. We use computers for their computing power to efficiently solve differential equation problems that involve projected values. This assignment is included in the class instead of just computing the various methods using a calculator because we can see our exact value and compare it with our computed value to check for its accuracy. Without checking for its accuracy, our results could be off by many decimal digits. Therefore, our projected value may not be the most accurate value without cross-checking.

    • Randy Mojum

      The links for my project were sent via email on 3/21/24

      • Jonas Reitz

        I got it – thanks!

  2. Nikolai Markov

    1) The project is a series of 3 code files in MATLAB. Each file represents a certain calculation method; either Euler’s method, Improved Euler’s Method, or Runge-Kutta method. All files contain comments that should be helpful in guiding the user on how to enter all the details correctly. The user should enter the h, initial x value, initial y value, and target/final x value into the calculator in the %Setup section. After that, the user should navigate to the %Function section at the very bottom of the document and enter the equation using the same x and y variables as they appear in the given diff equation.

    2)For the calculator i decided to use MATLAB, since I’m learning it this semester and that means i get a free license for the duration of it. I also chose MATLAB because it has most of mathematical stuff built in from the get go, and don’t need to reinvent the wheel with C++. All challenges for this project were unexpected, but they were very minor and didn’t affect the project at all. Most of the challenges were down to the fact that my MATLAB is only 4th grade level, so there was a bit of a language barrier when communicating with the native speaker that is my computer.

    3)As humans we don’t need the numerical methods, but for computers the numerical methods allow to plot any curve imaginable without needing to do calculus. Since computers can’t do anything above pre-calculus, there was a need for a way to be able to figure out the next x and y coordinates. This is useful for simulating real world systems, such as a financial market, or fluid dynamics.

    4)This assignment was included in the class so that the students could have an easier time absorbing the numerical methods. The “hands-on” approach, in a fully theoretical class provides us with demand for knowledge of the numerical methods without actually having to take tests, which usually serve the same purpose anyway, but are more stressful. And also it’s magnitudes faster than doing the calculations by hand, especially the Runge-Kutta method.

    5)The three project files will be sent via the citytech email

  3. Dario Vil

    For this project, my technological tool of choice was Google Sheets, which I utilized to generate an approximate solution to an initial value problem that was given through Webwork, whereby I had to estimate the value of y(2.8) using Euler’s method, Improved Euler’s method, and the Runge-Kutta method. Since I was utilizing Google Sheets as my technological instrument, the process of developing this project wasn’t as difficult as I had initially anticipated. The reason why I chose Google Sheets over options like a programming language or mathematical software was due to the fact that I had more experience with Google Sheets than the options I just mentioned, which helped me complete the project in a reasonable time frame. Since it was the most straightforward chart I could make among the three numerical methods, I began developing this project by making a chart for Euler’s method. In this chart, I have five rows for i, h, x_i, y_i, and k, in which the values of i and h were entered manually by me. Since the values for x_i and y_i (of i = 0) were provided, I have also manually inputted them; the remaining portions of my chart were solved and approximated using the formulas that were taught in class. The formulas that were used in this chart were (x_i+h) for x_i, f(x_i, y_i) for k and (y_i + h * k) for y_i + 1. After creating the chart for Euler’s method, I then went on to create charts for both the improved Euler’s method and the Runge-Kutta method, for which both charts had additional rows added to them. When creating these two charts, I followed the same procedure as I did for creating the Euler’s method chart, but I obviously used different formulas for the respective methods. Some of these formulas include (y_i + (h/2) (k1+k2)) for y_i+1 of improved Euler’s method chart and (y_i + h(k1 + 2(k2) + 2(k3) + k4) / 6) for y_i+1 of the Runge-Kutta method chart.

    The only real challenge I faced when completing this project was entering the formulas into my charts, as an incorrect formula could ruin my results. The reason why we need numerical methods in addition to the other methods we have learned in class is because we want the most accurate approximation to a problem, which can also reduce the time it takes to solve that problem. Numerical methods also help with solving problems that cannot be solved in a traditional manner. The assignment was given in class to demonstrate the value of utilizing computers when working with numerical methods since they allow for considerably faster and more accurate approximations of solutions. It would take some time and there is a chance that errors may be made while entering numbers into a calculator if someone tried to use one instead of a computer.

    The files of parts 1, 2 and 3 have been sent via email.

  4. Aaron Jones

    Describe your project and how it works.

    The project aimed to implement and compare three numerical methods for solving ordinary differential equations (ODEs) using MATLAB. The methods included Euler’s method, Improved Euler’s method (Heun’s method), and the Runge-Kutta method (specifically, RK4).

    The project began by defining a differential equation function and specifying initial conditions, step size, and the final value. Then, each method was implemented iteratively to approximate the solution trajectory of the ODE. The results were stored in arrays and presented in tabular form for comparison.

    Describe the process of building your numerical methods calculator. What kind of technology did you decide to use, and why? Did you encounter any unexpected challenges in completing this project?

    The numerical methods calculator was built using MATLAB due to its suitability for numerical computations and array operations. The decision to use MATLAB was based on its extensive library of mathematical functions and its popularity in scientific computing.

    The process involved defining the differential equation function, initializing arrays to store results, and implementing each numerical method iteratively. Challenges encountered included ensuring accuracy in the implementation of the Runge-Kutta method, especially with the computation of intermediate slopes. Debugging and optimizing the code for efficiency were essential steps in completing the project.

    Why do we need numerical methods in addition to the other methods studied in the class?

    Numerical methods are essential for solving complex mathematical problems, especially those involving differential equations, for which analytical solutions may not always be feasible. These methods provide practical techniques for approximating solutions to a wide range of mathematical models encountered in engineering, physics, economics, and other fields. They complement analytical methods by offering numerical approximations that can handle real-world complexities and non-linearities.

    Why is this assignment included in the class (instead of just computing the various methods using a calculator)?

    This assignment is included in the class to deepen my understanding of numerical methods and practical applications in solving differential equations. By implementing and comparing numerical methods using MATLAB, I gained hands-on experience in algorithm development, programming, and data analysis. This approach fosters critical thinking, problem-solving skills, and a deeper appreciation for the strengths and limitations of numerical techniques. Additionally, by engaging with real-world problems, students develop skills that are directly transferable to research and industry settings.

    I am going to email the link

  5. Nour

    a- this project has 3 parts of numerical methods the first part is the ruler’s method , the second part is the improved rulers method and the third part is the runge Kutta method, to start we preduct initial x and y values serve as starting points for the numerical methods.

    b- I used excel due to my familiarity and experience with the software, more used to it. I’ve never used any other coding software before. excel made it easy for me to do the math and see the results visually.

    c- we need numerical methods because they help us solve problems that regular math can’t handle on its own. while traditional methods rely on exact formulas.

    d-this assignment Is included in the class because its not just about getting answers quickly with a calculator. by doing it manually students will learn how these methods really work it helps to understand the math better and teaches problem solving skills. plus its useful in many jobs such as programming etc.

    I sent the link via email (city tech email.)

  6. Milly

    For my project, I decided to go ahead with using a spreadsheet. I attempted to use MATLAB but I ran into some errors such as being unable to make the program loop and go back to the first instructions after it calculates the data. Basically, my program is designed to do all three numerical methods calculator for the given differential equation. I’ve also made it easier to continue to calculate more data such as finding further values of y. Using the spreadsheet made it much easier in terms of calculations. The formula I used to gather each required data can be “dragged down” to calculate further values without the need of changing the formula itself.

    I believe that we need numerical methods because a lot of real-world problems involve complex mathematical models that don’t have an easily found solution. Numerical methods allow us to approximate solutions to these problems. In some cases, numerical methods might not yield exact solutions, but they provide sufficiently accurate approximations which allows us to have an idea of what the true/exact solution is.

    This assignment was included in the class to help us, the students, understand each and every component and formula that’s included in each method. Also, by using a calculator, the solution would be less accurate than that of a computerized program.

    I sent my project as an attachment and also a link to your email professor.

  7. Kahou Puan

    This project implements three numerical methods for solving ordinary differential equations: Euler’s method, improved Euler’s method, and the Runge-Kutta method. The code is written in Python and allows the user to enter the initial value problem details (initial x and y values, step size h, and target x value). The differential equation itself is defined in a separate function f(x, y). After the user inputs the problem setup, the code applies each of the three numerical methods to approximate the solution, outputting the y value at the target x for each method.

    I decided to use Python to build this numerical methods calculator for a few reasons. First, Python has a simple, readable syntax that allows the logic to be expressed clearly. Second, Python has strong built-in math capabilities and the NumPy library for efficient array math, which is very useful for numerical computations like these. One unexpected challenge was getting the exact number of evaluation points needed for each method, since the arange function includes the start but not always the end point. This required some care to get right.

    We need numerical methods like these because most differential equations cannot be solved analytically to get an exact symbolic expression for the solution. Numerical methods let us approximate the solution at specific points even when we can’t find a closed-form solution formula. They essentially replace the calculus with algebra, computing the next y value from the previous one. This allows computers to plot solution curves and simulate real-world systems modeled by differential equations.

    I think this assignment is included in the class to give students hands-on experience implementing these numerical algorithms, which reinforces understanding in a different way than just using them as a black box. Coding the methods yourself requires you to really grasp the logic of how they work step-by-step. It also shows how these tedious calculations can be automated instead of grinding them out by hand. Finally, it provides a starting framework that could be adapted to solve other differential equations of interest, demonstrating how numerical methods are applied in practice.

    I sent my project as Numerical Methods.docx and a link to your email.

  8. Manuel

    ·       Describe your project and how it works.

    It is an excel spreadsheet that uses formulas and variables to work out these three methods in its entirety. The formulas I am talking about were obtained from class and I used the most general version to know exactly where to put my numbers. I typed the formulas using the cells as variables and once it was in the corresponding place. All we have to do is drag down to reveal the results of the following steps.

    ·       Describe the process of building your project (technology challenges?)

    It’s all a matter of knowing the formulas and what goes where. When using formulas and dragging them down it automatically uses the cells under it to get the result of the next value. So, a challenge I experienced was trying to keep my “h” variable in a single cell but the drag down feature didn’t allow the cell to be called in from one spot. I overcame this by making a whole row so the “h” can be used as part of the drag down feature.

    ·       Why do we need numerical methods?

    I was able to build this excel spreadsheet and add all three methods in less than 2 hours. However, when I sat down to work on part 2, not only did I have to look back at old notes to remember rules and what to do when solving them, I committed a few algebra mistakes along the way. Causing me to calculate c multiply times. We used numerical methods to get approximations because it cannot solve the procedure analytically or its too long to solve analytically.

    ·       Why is this assignment included in the class?

    I believe this assignment is included in this class because it requires us to understand what each part of the equations means and how to use said equations. This also allowed us to see how these long calculations can be automated instead of being done by hand where human error is a factor. It also introduces us to varies ways this can be done. I had email notification on in open-lab and read some of my classmate’s comments. This lets me see how they did it differently using different programs and the different types of challenges they faced.

    ·       Please include a link to your project or file

    WILL BE SENT THROUGH EMAIL!

  9. Catherine Velasquez

    Describe your project and how it works.

    My project was building three different calculators for the three numerical methods such as Euler’s method, Improved Euler’s method, and Runge-Kutta method. The problem I had to solve as well as it’s initial value was given through webwork and I had to estimate the value (it’s stated in each sheet) using the different methods listed previously.

    Each numerical method calculator started with the same process which was creating the rows in excel. However, each method had varying number of rows, especially Runge-Kutta. The rows that all numerical calculators had in common were (i,h,xi,yi,yi+1). All numerical calculators also shared the same step size, which is provided in each sheet (Calculator). Euler’s Method was the simplest calculator of the bunch to create, but I will mention that the values for i,h,xi,yi were all provided. The rest of the vales were approximated by using the formulas were taught in class. These formulas were put below each calculator as notes, not only as a guide for myself but as a reference for others as well!

    Describe the process of building your numerical methods calculator. What kind of technology did you decide to use, and why? Did you encounter any unexpected challenges in completing this project?

    The technology I decided to use for building my numerical methods calculator was Excel Sheets. I used excel sheets because I don’t have experience with MatLab, Java, Python, etc. I do know that these programs are specific and it seemed more of a hassle to try and use them than Excel. The most challenging part would be learning shortcuts and how to use formulas. I know how to make rows and columns, not so much how to transform it into a calculator. It was difficult at first and I wasn’t sure how you got the numbers when you put a reference of the google sheet up for aid. It didn’t help me much, so I watched numerous videos to figure out how I could do it and it became clear. Not to mention learning tricks along the way was nice, I never realized how versatile Excel was until now. Of course, it’s not MatLab or anything, but it does a lot more than I anticipated!

    Why do we need numerical methods in addition to the other methods studied in the class?

    Numerical methods are useful when we stumble on a problem that can’t be solved easily, especially differential equations. The solutions may not be exact and are approximations, but depending on the step size and what method is used (Runge-Kutta, Euler, Improved Euler) we may reach a number that is close to the exact answer.

    Why is this assignment included in the class (instead of just computing the various methods using a calculator)?

    I think this assignment is included so students can build a deeper understanding and appreciation of Numerical Methods as well as their use. I will be completely honest and say that I loathed numerical methods (especially Runge-Kutta) because of the numerous parts that are involved in finding these approximations. I was not comfortable with finding each part (z’s,k’s,yi+1), but coding these methods and actively struggling with it made me grasp each method. By no means am I an expert at numerical methods, but they’re certainly less scary to deal with and it. In terms of appreciation what I mean is that yes we have calculators that would have made this project easier, but the fact that we had to make our own with the knowledge of how to make a program do the work for us exemplified how powerful technology has become. With a few inputs and a click of button we could have the answers to whatever problems we want. I’d also like to touch on the fact that this project forced students to adapt and learn or improve on their skills. Whether or not students did it on excel or various coding programs, these skills would aid us in many jobs.

    Please include a link to your project (if it is online), or clearly state that you will be sending me the files by email (and don’t forget to do it!).

    I’ll be sending the files through email shortly!

  10. Sebastian Torres

    a. For this project I made a numerical methods calculator in Microsoft Excel that implements Euler’s Method, the Improved Euler’s Method, and the Runge-Kutta Method in order to approximate solutions to assigned initial value problems. The way it works is by using a differential equation, its initial conditions, and step size that is then applied to one of the three numerical methods in order to calculate an approximate solution.

    b. As I mentioned before, the technology I chose to use was Microsoft Excel because I believed it would be the simplest to use. Making each numerical method was easy as I just copied the formulas from class and rewrote them in Excel and made a specific section for each method and designated a row for the x, y, h, k, and z values. I first chose to do Euler’s Method, but when entering the formula I got syntax errors and then excel suggested a fix, so I did it and dragged the formula down for the other values and got different numbers than my written calculations. I rewrote the formulas, but I kept getting different numbers or got a value that read “#VALUE!”, so I started over and dragged the formula down one by one instead of just dragging it straight down and getting a bunch of numbers, and this time I got matching values to the chart that was provided and my handwritten calculations. I then did the same thing for the other two methods, and I had no problems there.

    c. We need numerical methods along with the other methods studied in class because they allow us to solve mathematical problems that are too complex to solve manually. Manual calculations can only take us so far and some problems are too large for us to write down or do by hand, but with numerical methods, it allows us to use computational procedures and specific formulas that simplify the problem and lets us obtain our numerical solution and the applications of these methods can be incorporated in engineering, physics, economics, etc.

    d. I believe this assignment is included in the class in order for us to get a better understanding of these methods and the various applications they can be used for, as well as the different technological ways that these methods can be achieved. This project gives us the opportunity to use different technologies that can strengthen our understanding of a chosen technology, as well as learning how to use different technologies. For example, if I was used to using Java and I chose to use that then I could strengthen my understanding of this language through this project or if I wanted to get practice learning a different computer language or program I could use this project to do so.

    e. I will send my Excel sheet, my handwritten calculations, and comparison by email in a few minutes.

  11. Matthew Guncay Jimenez

    For my project, I used Java to create a Numerical Method calculator program, that computes the initial coordinates (3.5, 0.1) with an interval width(h) of 0.08 until the x-value is 3.98. The program has four classes named NumericalMethodApp, EulerMethod, ImprovedEulerMethod, and RungeKuttaMethod. The NumericalMethodApp class assigns the values 3.5, 0.1, and 0.08 to variables x0, y0, and h respectively. These variables will be used by the three other classes. The App class will also call the method, getResult(), of the three classes. In the EulerMethod class, the private variable k is created. The ImprovedEulerMethod class has the private variable k1, k2, and z. The RungeKuttaMethod class has the private variable k1, k2, k3, k4, z2, z3, and z4. All three classes have the private variables xi, yi, h and the same constructor. The constructor is used to assign the values of x0, y0, h in the App class to the private variables xi, yi, h. The three classes contain methods, each method is named after what private variable they solve for. For example, the method that is found in the three classes is named getX(), when called it computes and return the formula xi+=h, which is equivalent to xi+1= x­i+h. Therefore, the formulas used in the Euler, Improved Euler and Runge-Kutta have their own Java method. Each of the three classes has a Java method called getResult(). The purpose of the getResult() method is to format neatly what will be displayed to the System console. Since my problem has a sub-interval of 7, in the getResult() method there’s a for-statement that calls the Java methods in a particular order when int i Increment from 0 is less than 7. For each for-statement loop, what will be displayed in the System console is the coordinates (xi, y­i) and its k, z values. I decided to use Java as I’m learning Java programming this semester and wanted to apply my knowledge of it to this project. One of my objectives was to make the program organized and easy to modify. So, one of the first ideas was for ImprovedEulerMethod and RungeKuttaMethod class to inheritance/extend from the EulerMethod class, to minimize the program. However, that became a challenge as I noticed that each numerical method requires their own unique formulas and variables, therefore I wrote each class independently.

    When comparing the output coordinates of the program to my calculations, the coordinates and its slope for Euler method are closely identical. This is because for my calculations I rounded the slope and y-value by 8 decimal places while the program did not. The same can be said for the Improved Euler Method and Runge-Kutta method, some of the values in the program are greater or smaller than my computed values around the 8th decimal place.  

    We need numerical methods and the additional methods studied in class because we cannot get the exact solution of multiple unknown variables. However using the Methods, we can approximate the solution of the unknown variables. This assignment is included in the class to understand the accuracy of the Methods between using a computer to compute the solutions and doing the computation by hand.

    I will send you my files by email in a few seconds.

  12. Robert

    The project involved implementing numerical methods (specifically Euler’s Method, Improved Euler’s Method, and the Runge-Kutta Method) to solve a given initial value problem. The task was to approximate the solution to a first-order ordinary differential equation with a specified initial condition. The goal was to compare the accuracy of the numerical approximations with the exact solution obtained through analytical methods.

    Before starting the implementation, it was crucial to understand the algorithms behind each numerical method thoroughly.

    I chose Excel as the technology for implementing the numerical methods due to its accessibility, versatility, and ability to perform mathematical calculations.

    The Excel spreadsheet was organized to include columns for x,y, and intermediate calculations required by each method F(x,y) and z.

    Formulas corresponding to each method were used in Excel cells to calculate the values of y at each step. I had to ensure that the formulas accurately reflected the computational steps of each method.

    Calculations were performed by copying the formulas down the spreadsheet to compute the values of y for multiple steps. This allowed for a step-by-step approximation of the solution.

    After completing the implementation, the spreadsheet was compared to the given known results provided on Webwork to verify its correctness and evaluate its performance.

    Numerical methods are essential in solving differential equations and mathematical problems where analytical solutions are either unavailable or difficult to obtain. They provide practical computational techniques for approximating solutions with desired accuracy, making them indispensable tools in various scientific and engineering fields.

    This assignment is included in the class to deepen understanding of numerical techniques for solving differential equations. By implementing these methods themselves, we gain hands-on experience and a deeper insight into their workings, limitations, and applications.

  13. Julian Ruiz

    Describe your project and how it works.

    For my project, I used an excel spreadsheet in order to conduct the types of numerical methods. In order to start the project, I must insert the equations, which I have been taught in class. I typed the formulas as an equation and used certain commands in order for the formulas to work.

    Describe the process of building your numerical methods calculator. What kind of technology did you decide to use, and why? Did you encounter any unexpected challenges in completing this project?

    As stated from before, I typed the formulas as an equation and used certain commands in order for the formulas to work. However, before i did that, I made a row with each stated variable (Ex: h=height, x,y,k, and etc) I then only used the first set of numbers in order for the equations to work. I then inserted those numbers into the equation in order to get the next set of numbers. After that, I clicked the cell and dragged it down in order to get the rest of the numbers. As I was conducting the project, I experienced some  errors involving the equations in the cell. This was because I had problems with knowing where to put certain symbols in the right spot. After some fixes and calculations, I figured out how to fix it.

    Why do we need numerical methods in addition to the other methods studied in the class?

    We need numerical methods because we need to use it on order to find a solution/certain points if we struggle to find it. Although yes there are many other ways, the three numerical methods are more than likely the preferred ways of finding a solution when using any other solution.

    Why is this assignment included in the class (instead of just computing the various methods using a calculator)?

    This assignment was included in the class because we had to prove and show that there are other ways to solve the three numerical methods besides doing it by hand.

    Please include a link to your project (if it is online), or clearly state that you will be sending me the files by email (and don’t forget to do it!)

    I will be sending the project via email.

  14. Atta Tariq

    a. For this project, Numerical methods we are assigned a question through webwork and we will have to solve through all 3 methods Eulers method, Improved Eulers method and the Runge-Kutta method and get solution of those and to see which are mode accuracte. 

    b. I used Matlab for this project. I selected Matlab as i learned matlab in previous semster and also learning in this semester so that’s why i am using Matlab. For this I had to build calculator for all 3 methods and test them accordingly.

    c. Numerical methods play a vital role in modern science and engineering by enabling the solution of complex problems that cannot be tackled analytically. They offer practical computational tools for approximating solutions efficiently and accurately, making them indispensable in today’s technology-driven world.

    d. The inclusion of a numerical methods project in a class goes beyond mere computation by fostering deeper understanding, practical application, and skill development. Projects empower students to become proficient problem solvers equipped with the computational tools necessary for success in academia and beyond.

    e. I will email you my docs file.

  15. Arin Tang

    The project contains three numerical methods. The first method uses Euler’s method, the second method is the improved Euler’s method, and the last part is the Runge-Kutta method. The formulas used in the calculations were from class. In each method, I assigned xi to always plus one to the next row, while yi follows a different rule depending on the method used. Then I assigned h to equal 0.1, since this equation asked for 10 intervals I needed to divide 1 by 10. For F(x,y), k, and k1 it is set up to be the same formula for all three methods. For k2 and k3, the formula used is different for each method.

    For this project, I used Excel sheets to build my numerical calculator for all three methods. I felt most comfortable using this because I’ve had some previous experience. While making the first method, Euler’s method, I found it very simple because all I needed to do was follow my class notes and keep track of rows and columns. The second method, improved Euler’s method, was only two more steps but wasn’t too complicated. Lastly, the Runge-Kutta method was a little tricky. I did make some minor mistakes because some rows and columns were incorrect on the formula, so it would produce the wrong answers. But I did a double-check to make sure, so the errors were corrected. Another issue I had was trying to remove the z columns and implement them into the k2, k3, and k4 formulas. I tried to do it but I received some kind of error then a blue line would appear and they would all have the same result. Thus I reverted and let all the z be its row and column. It would look neater if I was successful in putting all the z equations into k2, k3, and k4. 

    We use numerical methods because they provide us with tools to give us the approximations to solve differential equation problems that cannot be solved. But it only gives approximations, not exact answers. In class, we learn various methods, starting from Euler’s method as the basic foundation of numerical methods. Improved Euler’s method adds two more steps to give a more accurate approximation. Lastly, the Runge-Kutta method combines the two other methods and adds more steps to give us the most accurate approximations out of the three methods we’ve learned.

    This assignment was included in the class to give us a better understanding of numerical methods and to review them. The project gave us one equation, then we had to find ways to create a calculator that incorporates all three methods. We could see the results from each method and determine which is more accurate. Additionally, it showed the ease of use of computer automation compared to manual calculations, saving time and reducing errors.

  16. Ariana

    For my project I used excel spreadsheets. I made one sheet for Eulers, one sheet for Improved Euler’s and one sheet for Runge kutta. For Euler’s method I have 5 columns labeled i, h, x, y, and k. My columns represent the x and y coordinates, the width of my interval, slope, and step. For the improved Euler’s Method I added a column for z, k1, k2, and k to represent the temporary point, the first slope , the second slope and the average of the slopes. For the Runge kutta method I added k3, k4, z2, z3, and z4 to represent the additional temporary points and slopes. I use equations in the spreadsheet to calculate my values once I added my given data. 

    I chose to use excel because I thought it would be the most straightforward but I was not completely right about that. I ran into a issue when creating my runge kutta sheet I noticed my final y value was way off and I couldn’t figure out why because my first row looked good compared to the table on Webwork so i had to go over the values one by one until i figured out i messed up the equation in the z4 column. That was unexpected and it took me a while to figure out. 

    We need numerical methods and I think the reason why we study them in class is because there are some differential equations in which we do not have a method to solve but with the numerical method we can find a specific value whether we have a method of solving that differential equation or not. Out of the three method Runge kutta is the most accurate because it uses parabolas instead of straight lines to approximate like Eulers and improved Eulers.

    My project links have been emailed.

  17. Kingston Ditsch

    This project uses a numerical methods calculator to approximate the solution to an Initial Value Problem using Euler’s Method, the Improved Euler’s Method, and the Runge-Kutta Method. The technology of choice for building the calculator was spreadsheets, specifically Google Sheets, because it was the most accessible. One sheet was created for each method. The following equations were used:

    In the Euler’s Method calculator, xi=xi-1+h, yi=yi-1+h(xi-1-yi-1), ki=xi-yi. In the Improved Euler’s Method calculator, xi=xi-1+h, yi=yi-1+h2(k1i-1+k2i-1), k1i=xi-yi, zi=yi+h(k1i), k2i=xi=1-zi. In the Runge-Kutta Method calculator, xi=xi-1+h, yi=yi-1+h(k1i-1+2k2i-1+2k3i-1+k4i-1)/6,  k1i=xi-yi, z2i=yi+h/2(k1i), k2i=xi+h2-z2i, z3i=yi+h2(k2i), k3i=xi+h2-z3i, z4i=yi+h(k3i), k4i=xi+h-z4i.

    No unexpected challenges were encountered during the project.

    We need numerical methods in addition to other methods because we cannot always solve differential equations exactly. The purpose of this project was to compare numerical approximations to the exact value of an initial value problem. The Runge-Kutta Method was the most accurate numerical method, producing four correct decimal points, yielding a 0.00211879% error when compared to the exact value.

    A full report can be viewed at this link.

  18. Oscar Ponce

    1. Describe your project and how it works. I created the numbers of steps taken that is used for all three methods as as well as the same x of n values because it doesn’t change with the method being used. I then created the each column have their own function using their parameters and highlighted for clarity. After making one row for each respective method I would drag down the cells with their functions to make it work indefinitely after manually inputting the first row of functions with the parameters. The first y of n+1 I had to create manually too because it needs to reference a previous value in the initial row in order to find the next y.
    2. Describe the process of building your numerical methods calculator. What kind of technology did you decide to use, and why? Did you encounter any unexpected challenges in completing this project? I used Excel spreadsheet because I had the most experience with it. Spreadsheets are very easy to copy functions with because you need to do it once and it will always reference the same column but different row values to be used in functions to find y of n+1 or z1 or k1. I had previous experience with working excel spreadsheets the only challenging part was trying to work with “C3” or “D3-D9” because the functions work with k1 not with C3.
    3. Why do we need numerical methods in addition to the other methods studied in the class? Numerical methods can compute calculations indefinitely and infinitely quicker than a human can. They can also be used to find a particular function that passes certain points as opposed to doing the calculation done by a person.
    4. Why is this assignment included in the class (instead of just computing the various methods using a calculator)? There is no need to solve a differential equation and are able to produce a good approximation that is accurate to 4 digits, at least in my example. This is helpful for not needing a extremely accurate number to the 10th decimal point.
    5. Please include a link to your project (if it is online), or clearly state that you will be sending me the files by email (and don’t forget to do it!).

    I sent the files via city tech email

  19. Shane Stanton

    My numerical methods project utilizes technology option #1, spreadsheets, in order to demonstrate its calculations. My project uses Google sheets in order to assign different formulas to different cells to make this calculator work nicely. I separated the cells into x,y, and k values. I used this method because it seemed the simplest and more practical. Excel is a widely used tool in the work world so I decided that learning that software is important for my future. I may need this method again in the future, who knows. WebAssign gave me the equation of y’=8x-9y, y(2.3)=0.4, y(2.54)=? I was told to use the step size of h=0.04. This is a pretty small step size so I expected the answer in my spreadsheet to be very similar to the solution of the initial value problem. It was close, however not exact. The Runge Kutta method came the closest to the IVP answer sharing a total of 4 correct decimal places. Improved Euler’s method only provided two shared decimal points and the plain Euler’s method provided zero shared decimal points.

    We need these numerical methods in order to predict the trajectory or path of something. When the future path or trajectory of something is unknown, we can use the information and measurements we have now to approximately calculate the object’s trajectory. The most practical case I can think of this is detecting patterns, and also an airplane’s/rocket ship’s flight path. I would assume that this assignment is included in class so we can do this on our own one day and truly understand more about how numbers work. 

  20. Shane Stanton

    All my work was emailed to you at 4/8/24 9:12pm professor

  21. Al Moktader Sadman

    1)So i tried to use excel since it seemed like the easier method to use for calculations because its easier to put calculations. The project began by solving the original equation and use that as a base to create equations that would give us better approximations.

    2)We need numerical methods because it would help us get better approximations without actually using a calculator

    3)The reason this project was added in the class was for us to get a better hands-on experience and understand the concepts more rater than the methods. That way its easier to do it irl.

    4)I’ll be sending my project through email. Right now my files are not downloading correctly but once it does ill send it right away, might go past 12 but will definitely send it before morning

  22. Matthew Smith

    The Euler’s Method, Improved Euler’s Method, and Runge-Kutta Method program was created in the Java programming language. The program takes the initial x, y, and h step values to approximate the value of y at the final x value of 5.12. A while loop was used for each method to repeat the numerical method formulas until the final x value was reached. Euler’s Method calculated and displayed to the console the iteration (i), x, y, and k1 values. Improved Euler’s Method calculated and displayed to the console the iteration, x, y, z, k1, and k2 values. The Runge-Kutta Method calculated and displayed to the console the iteration, x, y, k1, k2, k3, and k4 values.

    The project required a Java method for each numerical method. This made it easier to organize the code and work on each numerical method individually to troubleshoot. This program has no user input in its current version and has the formulas and the differential equation “hard-coded” in, making it not customizable to find the approximate values for different differential equations.

    Numerical methods can provide an alternative approach to complex differential equations. A computer can quickly solve complex equations with a numerical method. Numerical methods work with a wide range of complex differential equations.

    This assignment provided a great experience to learn how to take the numerical methods process on paper and turn that into a computer program. This project also provides the knowledge to create a computer program with these numerical methods to make solving a differential equation faster and more efficient. The knowledge that was learned for this project was used to test other characteristics of the numerical methods. The program that was created was copied and modified slightly to another program to see how accurate Euler’s Method could be with a small h-step at 0.00000000007. The program took three and a half hours to complete but provided a more accurate calculation.

    The exact solution to problem and the link to the code were sent via email.

  23. Maximo O Martinez

    The code works by making a function that takes each one of the runge kutta method steps after introducing the function of f. X0 y0 and x1. And also how many times you want to run (N) each step for more or less accuracy. Storing the value of each vx and vy every time. H or the distance is determined by variable h inside the function that way it stays consistent and you can set it to what you need. vx is x0 + h * i (i representing the time repetition in the array times the aforementioned distances so that in the second display it would show i+h2 and so on). And vy is the average of all k1 tp k4.  Lastly, it prints the array values of vx and xy skipping runs so that the number of numbers displayed/runs isn’t necessarily the same as N. it also takes each vy value and gets its tangent line slope at that specific point by multiplying it to the formula when printing.

    To build it I thought of what the Eulers method is trying to accomplish instead of looking at the individual steps. Since I know what it wants to do is stop multiple times (4 times to be specific) in the function graph in each h distance and then take the average of the 4 slopes and apply that slope to the current y coordinate to then take the first actual Euler step and repeat that process. I thought first of what would be needed to make that happen. You need the current x the next x and the current starting y. You also need the function in terms of x and y and also the formula in terms of x to get the slope. So essentially while building each k you need the previous k’s so you get half of each one after the first one and then take a full Euler step again for the last one (k4) to get the slope of the last one compared to the previous ones (k2 and k3). Essentially dividing it this way. K1 = function times the step distance. K2 = function of half the step distance of x plus x and half of k1 plus y, K3= half step of x plus x and half of k2 +y, k4= the slope of the end of the step which is the same as the advanced Euler’s method meaning we take x+ the distance h and y + previous step in this case k3. Then we take the average of all the k’s and store it in vy while vx is just the previous x + the step distance.

    We need numerical methods to be able to approximate ever more precisely what the next value of a seemingly random series might become while only having the initial conditions. Without the need for insane computational prowess but with a lot of steps

    I believe the assignment is included in the class so that we think as the modern engineers do and to be able to make calculators of the math that we are learning since doing things by hand and paper is becoming more and more obsolete in every math field with the advancement of computers. 

    (I will be emailing you the code shortly)

  24. Sean Suarez

    For my project, I decided to use an Excel spreadsheet to carry out my computations as a working numerical calculator. Technology is quite amazing when compared to hand-written computations and calculations of a differential equation. I learned that with the use of technology, one can calculate the value at a specific point through the Euler’s Method, Improved Euler’s Method, and Runge-Kutta Method extremely faster than by hand. The differential equation given to me was dy/dx = 6x-8y and had an initial condition of y(3.4) = 0.5 along with a step value of h = 0.08. Although the equation isn’t too difficult to solve, the fact of the matter is that some equations will be too complicated to solve or take way too much time to compute. This is where technology comes into play. Through Excel, I was able to solve each component of each of the three numerical methods in quick succession to find the approximate value of y(3.88). I first did these computations by hand which took very long to complete and found a value for y(3.88) for each of the three numerical methods. After I did Euler’s Method, Improved Euler’s Method, and Runge-Kutta by hand, I next went on Excel to list the initial row of data for each of the three Numerical Methods. This is all I would need to calculate the rest of the calculations in seconds. They do in fact match with my hand computations as well, although I did notice that Excel rounded some numbers.

    During Euler’s Method Excel Sheet, I separated each value into columns of i, h, x(i), y(i), k (slope), and y(i+1) which is the next actual y-value for the next corresponding x-value. I knew that to find k, I’d have to write the formula (6*C11)-(8*D11). What’s going on here is that it’s multiplying the number in cell C11 (3.4) by 6 and subtracting by the number in cell D11 (0.5) which is being multiplied by 8. These numbers sound familiar because they’re actually the initial starting value given. To find the next y-value, I wrote the equation ($B$11*E11)+D11. The dollar symbols represent that the true value for cell B11 will always be 0.08, which is true because that is the step size being added to each x-value. What this cell equation comes out to be is actually the equation (0.5*16.4) + 0.5 which is equal to 1.812. After this, I dragged down each column of numbers and the Excel sheet would calculate each number because of the equation I made for the cell values being K and Y(i+1). The most troublesome one would be the Runge-Kutta method in Excel and by hand calculation as well. The only difference was, once I figured out the cell equation for each value of k1, z2, k2, z3, k3, z4, and k4, the calculation was very fast. By hand however, the calculations took fairly long which is why I’m amazed at how quick it can be done through technology.

    Doing the calculations by hand and Excel has opened my eyes with how useful technology has become. Technology would calculate thousands of values before I could even get the answer to one approximation using the Runge-Kutta method by hand. This makes technology very useful to whoever can use it to the best of their knowledge. Even an amateur like myself, (who’s not so skilled at Excel) can use technology to my advantage and increase work efficiency which is crucial in the real world.

    I will be sending the Excel spreadsheets through email, and the rest is done by hand.

  25. Kunal Surujprasad

    1. My Numerical Methods Calculator is done on google spreadsheet as it was the most efficient way of completing the task. Spreadsheet one has the basic Euler’s Method, spreadsheet two has the Improved Euler’s Method and spreadsheet three has the Runge-Kutta Method. To solve a different problem, all you would have to change is the initial values of (x,y) for n = 0  and the method of solving for k aka y’. 
    2. Originally I wanted to use MATLAB but I had some technical difficulties laying out the parameters and using the zero() function. The only solution I could come up with was to use the round() function on the zero() function as the zero function required an integer but that would trade out the accuracy of the project which I deemed not worth it. On Google Spreadsheets I was able to compute the components easily without a loss of accuracy using the values given on the Webwork assignment as general guideline. On the Spreadsheet, n is the iteration of we are solving for, x and y are self explanatory where for n = 0; x and y are the initial values given, k1,k2,k3,k4 are the slopes, and Y(n+1) is the next y value in the sequence .
    3. Numerical Methods is important as it is another “tool in our toolbox” to solve differential equations. Also it is more beneficial to computers as they can do the computations necessary significantly faster than humans and is the preferred way for computers to solve this type of problem.
    4. This assignment is included in class so that we can understand the process instead of blindly trusting that the calculator is doing it correctly. Also it helps us understand the thought process of how computers solve this type of problem.
    5. A link to this project’s google spreadsheet will be sent via city tech email titled : Kunal Surujprasad – Differential equations – Project 1

  26. ousmane diop

    For my project, I used excel. My project counts three excel documents and one pdf for the resolution of the exact solution of the problem. Three documents, Euler’s method, improved Euler’s method and Runge-kutta method. For each method, we have x, y, i and k displays. The parameter z is also used in Improved Euler’s method and Runge-Kutta as an intermediate y-value. I used excel because of my familiarity and experience with the software.

    We need numerical methods because they provide techniques for solving mathematical problems that are difficult or impossible to solve analytically. Numerical methods also allow us to obtain approximate solutions with a desired level of accuracy.

    Numerical methods are indispensable in solving practical problems in industries such as aerospace, finance, medicine, and weather forecasting, where precise solutions are needed to make informed decisions.

    This assignment is included in class because it is not just getting the solution with a calculation, but it provides an opportunity for students to analyze errors that arise from numerical approximations. It also helps to practice problem solving skills in coding and programming. By comparing computed results with analytical or exact solutions, we can assess the accuracy and reliability of the numerical methods. 

    I send it via citytech email

  27. Dariel

    Reflecting on this project, I’ve come to appreciate the significance of numerical methods in tackling differential equations, which find applications across various fields like physics, engineering, and economics. The task involved implementing three different numerical methods Euler’s Method, Improved Euler’s Method, and the Runge-Kutta Method to approximate the solution to an initial value problem. Starting with an analytical solution, I then coded each method using Python, facing challenges in ensuring accurate slope calculations and iterative updates. Numerical methods are indispensable for solving complex problems lacking analytical solutions, making them vital in real-world scenarios like engineering design and climate modeling. This assignment aims to equip me with fundamental numerical techniques, preparing me for more advanced mathematical concepts and practical applications. Through this project, I’ve not only enhanced my problem-solving skills but also gained a deeper understanding of the role of numerical methods in scientific and technological endeavors.

Leave a Reply

Your email address will not be published. Required fields are marked *