Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
Assignment 3 - Question 2 May 11, 2007 11:22AM |
Registered: 17 years ago Posts: 24 Rating: 0 |
Re: Assignment 3 - Question 2 May 14, 2007 10:20PM |
Registered: 17 years ago Posts: 2,813 Rating: 0 |
y'(1) = -2.99: -------------- x = 1.000000, est: -2.596802 anal: -2.000000 x = 1.200000, est: -3.164576 anal: -2.592000 x = 1.400000, est: -3.700099 anal: -3.136000 x = 1.600000, est: -4.301923 anal: -3.584000 x = 1.800000, est: -5.481760 anal: -3.888000 x = 2.000000, est: -5.481760 anal: -4.000000 y'(1) = -3.01: -------------- x = 1.000000, est: -2.603202 anal: -2.000000 x = 1.200000, est: -3.193152 anal: -2.592000 x = 1.400000, est: -3.810026 anal: -3.136000 x = 1.600000, est: -4.739819 anal: -3.584000 x = 1.800000, est: -8.083086 anal: -3.888000 x = 2.000000, est: -8.083086 anal: -4.000000before interpolation is done, the two guesses should bracket the desired value, which is not the case here! yet, with a smaller stepsize like 0.02, it becomes the case! i'm going to submit the assignment with that stepsize, since 0.2 is just really too poor with modified euler for this problem to make sense - i suspect a typo (had one last year too with cos233). if only i'd started more than 24 or so hours before the deadline, i could've gotten confirmation from the lecturer :/
Re: Assignment 3 - Question 2 May 15, 2007 04:50PM |
Registered: 17 years ago Posts: 24 Rating: 0 |
y'(1) = -2.99: -------------- Xn Y(x) Anal 1 -2.00000 -2.00000 1.2 -2.86899 -2.59200 1.4 -3.51202 -3.13600 1.6 -3.94462 -3.58400 1.8 -4.22707 -3.88800 2 -4.41891 -4.00000 y'(1) = -3.01: -------------- Xn Y(x) Anal 1 -2.00000 -2.00000 1.2 -2.87501 -2.59200 1.4 -3.52372 -3.13600 1.6 -3.96117 -3.58400 1.8 -4.24777 -3.88800 2 -4.44336 -4.00000
Re: Assignment 3 - Question 2 May 15, 2007 04:57PM |
Registered: 17 years ago Posts: 2,813 Rating: 0 |
Re: Assignment 3 - Question 2 May 15, 2007 06:59PM |
Registered: 17 years ago Posts: 24 Rating: 0 |
x y(x) Anal 0.0 1.000000 1.000000 0.1 1.110210 1.094156 0.2 1.206820 1.173195 0.3 1.283940 1.231973 0.4 1.335750 1.265594 0.5 1.356920 1.269765 0.6 1.342980 1.241189 0.7 1.290880 1.178012 0.8 1.199520 1.080278 0.9 1.070300 0.950388 1.0 0.907672 0.793539 1.1 0.719693 0.618105 1.2 0.518444 0.435942 1.3 0.320380 0.262559 1.4 0.146519 0.117150 1.5 0.022425 0.022425
Re: Assignment 3 - Question 2 May 15, 2007 09:55PM |
Registered: 17 years ago Posts: 2,813 Rating: 0 |
Re: Assignment 3 - Question 2 May 15, 2007 10:16PM |
Registered: 17 years ago Posts: 2,813 Rating: 0 |
Re: Assignment 3 - Question 2 May 15, 2007 10:17PM |
Registered: 17 years ago Posts: 24 Rating: 0 |
Re: Assignment 3 - Question 2 May 15, 2007 10:22PM |
Registered: 17 years ago Posts: 2,813 Rating: 0 |
iter 256: |grad(f)|^2 = 0.006599 iter 512: |grad(f)|^2 = 0.002829 iter 768: |grad(f)|^2 = 0.001964 iter 1024: |grad(f)|^2 = 0.001413 iter 1280: |grad(f)|^2 = 0.001014 iter 1536: |grad(f)|^2 = 0.000726 iter 1792: |grad(f)|^2 = 0.000518 iter 2048: |grad(f)|^2 = 0.000369 iter 2304: |grad(f)|^2 = 0.000264 iter 2560: |grad(f)|^2 = 0.000190 iter 2816: |grad(f)|^2 = 0.000138 iter 3072: |grad(f)|^2 = 0.000103 iter 3095: |grad(f)|^2 = 0.000100 solution has converged, comparing with analytic: f(0.0) = 0.87700, analytic is 1.00000 f(0.1) = 0.97317, analytic is 1.09416 f(0.2) = 1.05680, analytic is 1.17319 f(0.3) = 1.12256, analytic is 1.23197 f(0.4) = 1.16513, analytic is 1.26559 f(0.5) = 1.17962, analytic is 1.26976 f(0.6) = 1.16207, analytic is 1.24119 f(0.7) = 1.10997, analytic is 1.17801 f(0.8) = 1.02278, analytic is 1.08028 f(0.9) = 0.90250, analytic is 0.95039 f(1.0) = 0.75414, analytic is 0.79354 f(1.1) = 0.58621, analytic is 0.61811 f(1.2) = 0.41096, analytic is 0.43594 f(1.3) = 0.24458, analytic is 0.26256 f(1.4) = 0.10717, analytic is 0.11715obviously my answers suck, and yours rock :| i'd be very interested to hear how you solved it and/or exchange code. i'm doing this in c++, you? my email address is in my profile, i'm happy to send my finished assignments (3 small pdf files); i have a feeling you also got 100% for the first two so it'd be interesting indeed.
Re: Assignment 3 - Question 2 June 15, 2007 07:13PM |
Registered: 17 years ago Posts: 2,813 Rating: 0 |