Message Boards Message Boards

0
|
4536 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Newton Raphson method in nonlinear equation? help me plz

Posted 11 years ago
hello i have a prob in coding newton raphson solver
i dont know how to code it in mathematica 5.2
i want to find out what is a , b and c

by using newton raphson. there is 3 equation f1 f2 f3
which are:
f1 =  -.036((.9 - a)^1.852) + .032((
        1.05 + a)^1.852) + .038((.85 + a)^1.852) + .693((.25 + a + b)^1.852)

f2=  .066((1 + b)^1.852) + 1.27((.25 + b - c)^1.852) - .26((.5 - b)^1.852) + \
.693((.25 + b + a)^1.852)

f3=  .16((.65 + c)^1.852) + .493((.45 + c)^1.852) - 1.078((.3 - c)^1.852) - \
1.27((.25 - c - b)^1.852)

a b and c start points are zero
plz help
POSTED BY: pourya m
2 Replies
As there are mulitple variables, you'll need to calculate the Jacobian of the equations.

See  http://fourier.eng.hmc.edu/e161/lectures/ica/node13.html
POSTED BY: Frank Kampas
Posted 11 years ago
= and := can be a little tricky when trying to write Newton.

I won't do the whole problem for you, because this might be homework, but I will show you some hints that should help you get started.
 In[1]:= aold = 0; bold = 0; cold = 0;
 
 In[2]:= f1 = -.036((.9-a)^1.852)+0.032((1.05+a)^1.852)+0.038((.85+a)^1.852)+0.693((.25+a+ b)^1.852);
 
 In[3]:= df1 = D[f1, a]
 
 Out[3]= 0.066672(0.9-a)^0.852+0.070376(0.85+a)^0.852+0.059264(1.05+a)^0.852+1.28344(0.25+a+b)^0.852
 
 In[4]:= anew = aold - (f1/df1 /. {a->aold, b->bold, c->cold})

Out[4]= -0.15003
Study this. If it is too complicated then try a simpler f1 and study that. See if you can relate each part of this to the definition of Newton from the textbook. Do this until you think you see it is working correctly for the first step with the first variable. When you think you have that working then think how to add a second and third function and variable to this and just do the first step of Newton.

When you think you have that correct the try doing the second step manually and see if that is correct.

After you have several manual steps done then you might think about how to make the steps repeat without having to do this manually.

Always check very carefully to make certain that I have not made a mistake in this.

Hopefully these will be enough hints to get you started. If you get stuck then post again showing what you have done and how much progress you have made and what part you cannot see how to do.
POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract