Comments (4)
Can you post a copy of the discussion?
from computational-thinking.
For sure, just added
from computational-thinking.
Thanks for including, but can you explain briefly why it should be reversed?
from computational-thinking.
Sure! It's my understanding that the standard explicit Euler method just uses the information at the beginning of the time step, as stated in the homework assignment:
https://github.com/mitmath/18S191/blob/a5cf7fd3b04d6d285bcd1239d3dcb009342a26fe/homework/homework6/hw6.jl#L210-L212
The test seems to think that we should use the slope at the end of the step: f(a+h) ≃ f(a) + hf'(a + h)
instead of the beginning: f(a+h) ≃ f(a) + hf'(a)
. I don't think this slight modification was mentioned in the homework assignment, which made me think that it probably wasn't the intention to take us down the path of explicit vs implicit numerical methods.
As a sanity check, I just plugged in the test values to both versions, which appear flipped to what it should actually be testing, assuming only the explicit Euler method should be implemented. So, for result = euler_integrate_step(fprime=x -> x^2, fa=10, a=11, h=12)
in the test (kwargs added for my own sanity), this corresponds to:
result = f(a) + h*f'(a + h) = 6358
for the correct
branch and:
result = f(a) + h*f'(a) = 1462
for the almost
branch, when really it should be the other way around.
from computational-thinking.
Related Issues (20)
- inverse_climate_model failed to precompile Plots
- Notebook not being recognized by Pluto
- hw1 Ex3.5 noisify test
- Add T-shirt link on the website HOT 1
- Add CompThinking Twitter on website HOT 1
- README updates vs index
- Code in "Newton method in 2D" doesn't match the latex equation
- Symbolic expansion broken in Newton notebook 1.6 HOT 1
- is there a plan to start the course in Fall21?
- Internal links opened from notebooks show the sidebar twice (bug) HOT 1
- [Website] Hide sidebar HOT 1
- Preinstall packages for offline access
- Variable red overrides function in images.jl
- Homework 1 - images and arrays, "Section 1.1" url in a hint leads to a 404 page
- Typo on class Section 3.2 notes, the Fall 2023 edition. HOT 1
- Link on readme is to Spring21 instead of latest HOT 1
- Varible red overrides function in hw1.jl HOT 1
- License HOT 3
- The add packages lines cause a lot of problem HOT 9
- Embedded Youtube URL link empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from computational-thinking.