1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solve nonlinear equation using newton raplson method

  1. Jun 3, 2014 #1

    wel

    User Avatar
    Gold Member

    The three non-linear equations are given by
    \begin{equation}
    c[(6.7 * 10^8) + (1.2 * 10^8)s+(1-q)(2.6*10^8)]-0.00114532=0
    \end{equation}
    \begin{equation}
    s[2.001 *c + 835(1-q)]-2.001*c =0
    \end{equation}
    \begin{equation}
    q[2.73 + (5.98*10^{10})c]-(5.98 *10^{10})c =0
    \end{equation}
    Using the Newton-Raphson Method solve these equations in terms of [itex]c,s[/itex] and [itex]q[/itex].

    => It is really difficult question for me because i don't know very much about the Newton-Raphson Method and also these non-linear equations contain 3 variables.

    I have try by applying the newton-Raphson method to each equations:-
    \begin{equation}
    f(c,s,q)=0= c[(6.7 * 10^8) + (1.2 * 10^8)s+(1-q)(2.6*10^8)]-0.00114532
    \end{equation}
    \begin{equation}
    g(c,s,q)=0= s[2.001 *c + 835(1-q)]-2.001*c
    \end{equation}
    \begin{equation}
    h(c,s,q)=0= q[2.73 + (5.98*10^{10})c]-(5.98 *10^{10})c
    \end{equation}
    now i guess i need to work out [itex]f'(c,s,q), g'(c,s,q), h'(c,s,q)[/itex] but i dont know how?

    and after working out [itex]f'(c,s,q), g'(c,s,q), h'(c,s,q)[/itex] . After that i think i need to use newton-raphson iteration:

    [itex]c_{n+1}= c_n - \frac{f(c,s,q)}{f'(c,s,q)}[/itex]

    but the [itex]f(c,s,q)[/itex] and [itex]f'(c,s,q)[/itex] contains the [itex]s[/itex] and [itex]q[/itex].

    Similarly, for

    [itex]s_{n+1}= s_n - \frac{g(c,s,q)}{g'(c,s,q)}[/itex]

    will have [itex]g(c,s,q)[/itex] and [itex]g'(c,s,q)[/itex] containing the [itex]c[/itex] and [itex]q[/itex[].

    [itex]q_{n+1}= q_n - \frac{h(c,s,q)}{h'(c,s,q)}[/itex]

    will have [itex]h(c,s,q)[/itex] and [itex]h'(c,s,q)[/itex] containing the [itex]c[/itex].

    so am i not sure what to do please help me. to find the values of [itex]c,s,q[/itex].
     
  2. jcsd
  3. Jun 3, 2014 #2

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Perhaps you should read how the Newton Raphson method works for multi variable problems. Here's one link:

    http://fourier.eng.hmc.edu/e161/lectures/ica/node13.html

    [Edit, added] Why don't you simplify the equations a bit first? Also, are you using something like Maple or Mathematica? If so, why not let the package solve the system? I'm not a computer scientist, but I would be wary of a system with huge numbers and little bitty numbers.
     
    Last edited: Jun 3, 2014
  4. Jun 4, 2014 #3

    wel

    User Avatar
    Gold Member

    I need to calculate by hand without any mathematical software. that's the reason i am having difficulty. please help me.
     
  5. Jun 4, 2014 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    '
    You have already been told what you need to do; have you tried it?

    Personally, I would be skeptical about the use of a standard method on your problem as it stands, because your problem is very badly scaled. You can get a much better-behaved system by using scaled variables: let ##s = 10^{-8} s'## and ##c = 10^{-9} c'##. Then the system becomes
    [tex] .93 c'-.26 c' q-.00114532 +.7065655170 \times 10^{-11} c' s' = 0\\
    835 s'-835 s'q-.2001 c' + .2001 \times 10^{-8} c' s'= 0 \\
    2.73 q+59.8 c' q-59.8 c' = 0
    [/tex]
    In this new system the bad scaling is limited to the terms in ##c' s'## in the first two equations. It is very probable that much better accuracy can be obtained from solving the new system.
     
  6. Jun 4, 2014 #5

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    @Ray: Interestingly enough, Maple will give an answer to that system. Then if you solve the same system without the ##c's'## terms, you get the same answer. Not too surprising, I guess. I'm thinking those two terms would also raise havoc when calculating the inverse of the Jacobian for Newton-Rhapson.
     
  7. Jun 4, 2014 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Yes, I did everything in Maple.

    If you take the original system but first convert the numbers from floats to rationals, the maple command 'solve' produces a solution in terms of some 'Root_Of' expressions; then applying the 'allvalues' command produces 4 symbolic solutions, but which are huge, multi-page monsters that involve enormous rational numbers, etc. Applying 'evalf[n]' for n-digit evaluation produces two complex and two real solutions. Applying 'solve' on the original system, with no rational conversion, produces essentially the same 4 floating-point solutions. Using 'fsolve' instead produces one of the 4 solutions, and if I am not mistaken, is done essentially by implementing Newton's method. I suspect that the implementation was done carefully enough to get around bad scaling, perhaps by using a self-scaling version of Newton.
     
  8. Jun 5, 2014 #7

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    @wel: Where did this problem come from? If it is just a problem where you are supposed to learn how Newton-Rhapson method works, then it is a ridiculous teaching example. On the other hand, if you are studying numerical analysis and learning about how to handle systems that aren't well behaved, it would be a more appropriate problem. Please give us the context in which this problem arose.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted