How do I Solve for the unknowns phi and s using the newton-raphson method?

How do I solve these nonlinear equations for the unknowns using matlab? The angle phi and s using the newton-raphson method?
R sin (theta ) + L sin(phi) = H ....(1)
R cos(theta) + L cos(phi) =s....(2)
I know that
phi = arcsin ([H cos(theta) - s sin(theta)] /L) + theta
and
s =R cos(theta) + L cos(phi)s =R cos(theta) + L cos(phi)

Answers (1)

How about solving first for phi in the first equation and then solving for s in the second equation in terms of this phi?
t = asin((H-R*sin(theta))/L);
phi = asin(t)
or
phi = sign(t)*pi - t;
Then
s = R*cos(theta) + L cos(phi);
This gives you two solutions for phi in the range -pi <= phi <= pi. There are of course infinitely many other solutions for phi in other 2*pi-length intervals.
You don't need to use newton-raphson.

2 Comments

professor is requesting we use newton-raphson.
http://en.wikipedia.org/wiki/Newton's_method#Nonlinear_systems_of_equations

Sign in to comment.

Asked:

on 3 Mar 2014

Commented:

on 4 Mar 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!