Results 1 to 2 of 2

Math Help - C++/matlab programming

  1. #1
    Junior Member
    Joined
    Oct 2007
    Posts
    32

    C++/matlab programming

    So I am given three non linear equations:
    Code:
        x1(x2-2)=0,
        x2(x3-3)=0, 
        x3(x1-1)=0
    and i need to solve using newtons method using 100 randomly selected initial guesses for x1^(0), x2^(0) and x3^(0).
    Last edited by CaptainBlack; January 21st 2008 at 10:48 PM. Reason: to make readable
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by anncar View Post
    So I am given three non linear equations:
    Code:
        x1(x2-2)=0,
        x2(x3-3)=0, 
        x3(x1-1)=0
    and i need to solve using newtons method using 100 randomly selected initial guesses for x1^(0), x2^(0) and x3^(0).
    First find the Jacobian:

    <br />
J(x_1,x_2,x_3)=\left[ \begin{array}{ccc}x_2-2&x_1&0\\<br />
                                                       0&x_3-3&x_2\\<br />
                                                       x_3&0&x_1-1 \end{array}\right]<br />

    Now Newton's method proceeds from a initial approximation of guess: P_{(0)} to the next approximation using by solving:

    J(P_{(0)}) \delta P = F(P_{(0)})

    for \delta P, then the next estimate is:

    P_{(1)}=P_{(0)}+ \delta P.

    Then the general itteration step is:

    solve:

    J(P_{(n)}) \delta P = F(P_{(n)})

    for \delta P, then the next estimate is:

    P_{(n+1)}=P_{(n)}+ \delta P.

    In Matlab the equation J dP= P is solved using a statement of the form:

    dP=J\P

    if I recall correctly


    RonL
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Matlab programming error help
    Posted in the Math Software Forum
    Replies: 7
    Last Post: February 1st 2010, 08:25 PM
  2. MATLAB linear programming question
    Posted in the Math Software Forum
    Replies: 0
    Last Post: January 31st 2009, 03:08 PM
  3. MATLAB linear programming
    Posted in the Math Software Forum
    Replies: 0
    Last Post: January 31st 2009, 03:02 PM
  4. Replies: 1
    Last Post: November 17th 2008, 04:18 AM
  5. Matlab programming
    Posted in the Math Software Forum
    Replies: 12
    Last Post: December 12th 2007, 03:38 AM

Search Tags


/mathhelpforum @mathhelpforum