maxburakho

30 Reputation

4 Badges

6 years, 273 days
exxonmobil
chemical process engineer
"Some Talk of Alexander and Some of Hercules, of Hector and Lysander and Such Great Names as These, But of All the World's Brave Heroes, There Is None That Can Compare, with a Tow Row Row Row Row Row, to the British Grenadiers..."

MaplePrimes Activity


These are questions asked by maxburakho

how do you answer people's questions on here to get the points?

equations:
x[j-1]-2x[j]+x[j+1]=0, j=3...98 where x[j] is x-sub -j
-2x[1]+x[2]=5
x[1]-2x[2]+x[3]=-4
x[98]-2x[99]+x[100]=-8
x[99]-2x[100]=13
 
I'm trying to solve them using Isaac Newton's method for numerical approximation with epsilon equal to 1e-6 such in C++ code below
 
double epsilon=1e-6;
double x=1.0;
double f=x[j-1]-2x[j]+x[j+1] j=3...98; x3-x97+x98=3;
double Df=1-2+1;
while (fabs(f)>epsilon){
cout<<x<<endl;
x-=f/Df
f=x[j-1]-2x[j]+x[j+1] j=3...98; x3-x97+x98=3;
Df=1-2+1;}
cout<<x<<endl;
Page 1 of 1