Hi All,(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to solve a set of coupled non-linear algebraic equations. I'm doing this using the LinearSolve fcn of mathematica and an implementation of the Newton-Raphson method. One of the issues I'm having is that I need to tell mathematica that one of these variables,let's say x, is a real number. In my Newton-Raphson scheme I initialize all of my variables, and I set x to initially be a real number. But as the process iterates x gets a complex component. Is there any command that will tell mathematica that x always needs to remain real?

I have seen that if one uses the functions Reduce and Solve, they can pick the output to be real. But unfortunately I do not believe I can use those fcns since I have a matrix equation to solve, and I do need some of the variables to be complex.

Any help is greatly appreciated.

Happy Holidays.

**Physics Forums - The Fusion of Science and Community**

# Mathematica setting variable to be real number

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: Mathematica setting variable to be real number

Loading...

**Physics Forums - The Fusion of Science and Community**