Page 1 of 1

Homework 7, due November 4, 2009.

Posted: Fri Oct 30, 2009 2:32 pm
by goodwine
Reading: All of Chapter 13 in the course text except Section 13.7

Problems:
  • Problem 1.2 and 1.3. Use Euler's method, like the problem asks, but additionally do 4th order Runge-Kutta. Also, for a step size of dt=0.1 for Euler's method, approximately what step size gives the same accuracy using 4th order R-K? You can answer this by experimenting and graphing the answer or error; it's not a theoretical question.
  • Problem 13.1, except use sin(t) + t^2 for the inhomogeneous term. I didn't realize I was doing the exact same problem as the course example.
  • Do Example 1.9.2 from the text using 4th order R-K. Compare with the answer that matlab gives using ode45().
  • 4th order R-K requires that f(x,t) be evaluated 4 times during each time step. So, it seems that a fair comparison would be to compare the error for 4th order R-K with a given dt to using Euler's method with a dt that is 4 times smaller because Euler's method only requires that f(x,t) be evaluated one time during each step. Using the same system as was used for all the class examples in the numerical methods topics, compare the error for 4th order R-K with a specified dt to Euler's method with dt 4 times smaller. Which is better? More importantly, explain why.

Re: Homework 7, due November 4, 2009.

Posted: Sun Nov 01, 2009 5:11 pm
by Josh
For the fourth bullet point, should we use Euler/RK to evaluate a specific problem and then compare the errors? Should we make up an example problem?

Re: Homework 7, due November 4, 2009.

Posted: Sun Nov 01, 2009 7:56 pm
by goodwine
Josh wrote:For the fourth bullet point, should we use Euler/RK to evaluate a specific problem and then compare the errors? Should we make up an example problem?
You should be able to explain mathematically which one is better. Demonstrating it on an example would be good too.

Re: Homework 7, due November 4, 2009.

Posted: Mon Nov 02, 2009 1:59 pm
by elegault
is it mandatory to use fortran for the homework? or can the programs be written in matlab?

Re: Homework 7, due November 4, 2009.

Posted: Mon Nov 02, 2009 2:03 pm
by goodwine
elegault wrote:is it mandatory to use fortran for the homework? or can the programs be written in matlab?
You may not use matlab for your program. You may us it to plot and/or compare to what ode45() says.

Re: Homework 7, due November 4, 2009.

Posted: Mon Nov 02, 2009 7:44 pm
by alibardi
Can i turn in the same plot for the 4th bullet point and one of the first problems (1.2 or 1.3) if I explain everything i need to? Or should I do separate problems?

Re: Homework 7, due November 4, 2009.

Posted: Mon Nov 02, 2009 8:20 pm
by goodwine
alibardi wrote:Can i turn in the same plot for the 4th bullet point and one of the first problems (1.2 or 1.3) if I explain everything i need to? Or should I do separate problems?
You may if problems 1.2 or 1.3 use the same differential equation. Off the top of my head, I don't recall that they are the same. But I would say in general you can do stuff like that as long as you are answering all the questions. In fact, I'd say it's preferred.

Re: Homework 7, due November 4, 2009.

Posted: Mon Nov 02, 2009 10:03 pm
by alibardi
goodwine wrote:
alibardi wrote:Can i turn in the same plot for the 4th bullet point and one of the first problems (1.2 or 1.3) if I explain everything i need to? Or should I do separate problems?
You may if problems 1.2 or 1.3 use the same differential equation. Off the top of my head, I don't recall that they are the same. But I would say in general you can do stuff like that as long as you are answering all the questions. In fact, I'd say it's preferred.
I thought we could use any problem we wanted for the 4th part...or is there a specific one you want?

Re: Homework 7, due November 4, 2009.

Posted: Mon Nov 02, 2009 10:05 pm
by goodwine
alibardi wrote:
goodwine wrote:
alibardi wrote:Can i turn in the same plot for the 4th bullet point and one of the first problems (1.2 or 1.3) if I explain everything i need to? Or should I do separate problems?
You may if problems 1.2 or 1.3 use the same differential equation. Off the top of my head, I don't recall that they are the same. But I would say in general you can do stuff like that as long as you are answering all the questions. In fact, I'd say it's preferred.
I thought we could use any problem we wanted for the 4th part...or is there a specific one you want?
It says "sing the same system as was used for all the class examples..."