HP50g: solve quadratic equations

How would you solve a quadratic equation on the HP50g? I already know how to use the normal algebraic solver, but I can't solve x^2+2x+1=0, for example. Also, when I hit EXPAND ((x+2)*(x-2)), like the integrated help forum says, it doesn't come up with the solution set. It comes up with -9.9999999E499, which is obviously not the correct answer. How do I change both of these?

Hi,
There are several ways to find the roots.
Method 1:
A useful method is to use the numerical solver:
Red-Right-Shift    NUM.SLV  (on 7 key), then choose "3. Solve poly.."
Enter the vector of coefficents, e.g. for x^2+2x+1=0 enter [1,2,1] then with Roots section highlighted, choose F6 SOLVE
Answer is [-1 -1]
for example x^2-4=0 enter [1,0,-4]
Answer is [-2 -2]
Method 2a:
Another method is to use the SOLVE command, White-Left-Shift   S.SLV, 6.SOLVE (or F6 SOLVE if using soft menus).
In RPN mode:
'X^2-4'
'X'
SOLVE
Answer: {X=-2 X=2}
Algebraic mode:
SOLVE(X^2-4,X)
Answer: {X=-2 X=2}
Method 2b:
As a shortcut you can use SOLVEVX command, White-Left-Shift   S.SLV, 5.SOLVEVX (or F5 SOLVEVX if using soft menus).
With this command, the current active variable is assumed to be soved for (indicated on the top of the screen, usually 'X'). You then do not need to specify the variable to solve for.
In RPN mode:
'X^2-4'
SOLVEVX
Answer: {X=-2 X=2}
Algebraic mode:
SOLVEVX(X^2-4)
Answer: {X=-2 X=2}
Please see page 3-229 & 3-230 in the Advanced User's Reference Manual (v2) for notes and flag settings for the various SOLVE commands.
You can download the Advanced User's Reference Manual (v2) from this web page:
http://h10025.www1.hp.com/ewfrf/wc/manualCategory?cc=us&dlc=en&lc=en&product=3235175&
(section 3 of this reference details each command of the 50g)
Hope this helps.
Note: I do not work for HP, I just like playing with calculators :-)

Similar Messages

  • Quadratic equation

    how to solve quadratic equations in java

    nomi21 wrote:
    how to solve quadratic equations in javaThink about the difference between solving a quadratic equation in java and on paper.
    If you got the resolution start coding.

  • Is there a limit on the size of the input for the Solve Linear Equations block?

    Hello,
    I'm trying to figure out why the Solve Linear Equations block will properly function with some sets of data and why it won't with others. What my program is doing is taking a signal and comparing it with a batch of sine and cosine waves to try and pick out patterns in the data. I have different sample sizes and it seems to work when I throw 3900 points at it. However, I have another set with 4550 points and it gives me incorrect amplitudes for my sinusoids.  Is there some limit to the size of the matrices that I can give this block? Or is there some other workaround that still allows me to keep all of my data?
    Thanks,
    David Joseph

    Well, the best way to show what I expect is to see the entire program. It's pretty evident that when looking at the graphs, something isn't right. What is supposed to happen is that the runout amplitudes are found, and then those sinusoids are subtracted from the initial data, leaving tooth to tooth data and noise. When I use the larger arrays, it seems as though not all of the data gets through (count the peaks on the product gear runout graph vs. initial) and the amplitudes are much to small, such that nothing is really taken out and the tooth to tooth data looks like the initial data.
    Also, we will also be using an FFT, but it will be limited to only determining the frequencies we should check. I've fought with the fft blocks quite a bit and I just prefer to not use them. Plus, the guy I'm writing this for wants exact answers and does not want to pad or resample the data or use windows.
    The exact number of data points isn't important (ie. 4550 vs 4551) since I use the array size block to index the for loop.
    As for typical values, they can change a lot based on materials. But, the original 3900 data point sets and the 4550 data point sets used practically identical gears. So, use the original 3900 sets I've included as references (check the RO array block numbers to compare).
    I've included 3 3900 samples, 3 4550 samples, and 3 4550 samples that have been truncated to 3900 or so as constants on the block diagram.
    Also, the check for additional runouts (like 3 per rev, 4 per rev, etc..) is optional, but if you choose to use it, use positive integers only.
    I don't know how much of this program will make sense and I have wires running everywhere.. so good luck. Keep in mind I'm only a student and I hadn't touched Labview until about 2 or 3 months ago.
    Thanks,
    David Joseph
    Attachments:
    Full example.vi ‏139 KB

  • Drawing quadratic equations on a 2D cartesian co-ordinate system

    Hi,
    I need to design a 2D cartesian co-ordinate system to plot quadratic equations on the graph using pure action script. Quadratic equations are of the form y = ax^2 + bx + c where a,b and c are the variables for which the values need to accepted from the user as input. Accordingly, the curve needs to be plotted on the graph.
    Could anybody kindly help me to write an action script 3.0 code to suffice the above requirement?
    Thanks in advance.
    Cheers,
    Pratik.

    that will take more work than doable in a forum.  to start, you need to find the roots of your equation (use the quadratic formula) and make sure the real roots are towards the center of your x-axis.  the two parts where y tends towards (+infinity or -infinity) do not require much display.
    if there is only 1 or 0 roots, put that equation in vertex form and use an x-axis centered around the vertex.
    for a sample of how this can be done:  http://www.kglad.com > snippets > function graphs.

  • Solving differential equations

    I m working on a project of fluids and i wannu use java programming for solving various equations..please teel me how to solve differential equation using java(partial diffential equations and integration also).thanx

    Hi!!
    Thanx for ur reply...but I have seen a program on net called JMatLink...which uses JAVA program to opens MATLAB and get the result from MATLAB and show it on its on GUI.I dont know the exact structure but i suggest u to check it and tell me how it works if u know.Sorry for bothering u again and again...but i need it badly for my project.
    explore the following link.
    http://www.held-mueller.de/JMatLink/
    Thanx

  • Solving Differential Equation - getting strange results.

    Hi, i am using LabView to model the mathematic pendulum which comes down to solving the quation numericaly:
    where w is constant and 0 is an angle between the pendulum's cord and the vertical which i want to plot against time. I built this very simple model to solve this equation (this is what our teacher showed us) [x is the angle]
    and this is what i get:
    "fi" is the starting angle. The result is a cosine , as it is to be expected, with the right period, but why the amplitude is so low? Am i missing something here? No matter how i change the initial value, the amplitude is always 5 oders of magnitude lower. It wouldnt be a problem, since what we are required is to solve the equation, but when i want to factor that in the equation above 0 should be sin0 , the problem arises - sinx for so low x , is...x. So my questions are:
    - am i setting the initial conditions wrong?
    - has the value of dt anything to do with it?
    - is the method correct?
    - am i clueless? 
    A week ago i had no idea what LabView is. We were all thrown into the deep water, we were shown the method, but were not teached how the LabView works,so please, be kind.
    Thank You in advance .
    Attachments:
    pendulum.vi ‏14 KB

    Hello;
    Noise is a difficult issue to advise about.
    There are some things you can try, but the result will depend on different factors, such as, environment, lenght of cables, equipment on vicinity, etc.
    Anyways, you can try to hook up a BIAS resistor in between the ch- and AIGND on your BNC device. That resistor will bleed out the common voltage current and help on noise balancing. Another thing you can try is to hook up a simple RC low pass filter at the analog input. That might help to get rid of that noise.
    I'm also attaching an App Note that talks about Noise and some ways to get around it.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments
    Attachments:
    Field_Wiring_and_Noise_Considerations.zip ‏196 KB

  • Solving Cubic equation

    Hello!
    I am trying to create an applet which solves cubic equations. I have managed to create the layout
    but the maths is causing problems. Well, I am a newbie and don't know much yet.
    Here's what I've done so far:
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class CubicEquation extends java.applet.Applet implements ActionListener
      TextField aTxt, bTxt, cTxt, dTxt;
      int a, b, c, d;
      double f, g, h;
      Button graphBtn;
      int size = 750;
      public void init()
        setLayout(null);
        resize(1000, 800);
        Label Albl = new Label("a:");
        Albl.setBounds(780, 40, 15, 20);
        Label Blbl = new Label("b:");
        Blbl.setBounds(780, 70, 15, 20);
        Label Clbl = new Label("c:");
        Clbl.setBounds(780, 100, 15, 20);
        Label Dlbl = new Label("d:");
        Dlbl.setBounds(780, 130, 15, 20);
        Label Rlbl = new Label("Range:");
        Rlbl.setBounds(760, 170, 45, 20);
        aTxt = new TextField();
        aTxt.setBounds(800, 40, 80, 20);
        bTxt = new TextField();
        bTxt.setBounds(800, 70, 80, 20);
        cTxt = new TextField();
        cTxt.setBounds(800, 100, 80, 20);
        dTxt = new TextField();
        dTxt.setBounds(800, 130, 80, 20);
        graphBtn = new Button("Graph it");
        graphBtn.setBounds(810, 250, 55, 20);
        add(Albl);
        add(aTxt);
        aTxt.addActionListener(this);
        add(Blbl);
        add(bTxt);
        bTxt.addActionListener(this);
        add(Clbl);
        add(cTxt);
        cTxt.addActionListener(this);
        add(Dlbl);
        add(dTxt);
        dTxt.addActionListener(this);
        add(Rlbl);
        add(graphBtn);
        graphBtn.addActionListener(this);
        public void displayGraph(Graphics g)
          g.setColor(Color.cyan);
          for (int y = 0; y <= size; y = y + 10)            //Draw Grid//
            g.drawLine(1, y, size, y);
          for (int x = 0; x <= size; x = x + 10)
            g.drawLine(x, 1, x, size);
          g.setColor(Color.black);
          g.drawLine(size / 2, 0, size / 2, size);
          for (int i = 0; i <= size; i = i + 20)            //Draw y axis//
            g.drawLine(size / 2 - 5, i, size / 2 + 5, i);
         g.setColor(Color.black);
         g.drawLine(0, size / 2, size, size / 2);
         for (int j = 0; j <= size; j = j + 20)             //Draw x axis//
           g.drawLine(j, size / 2 - 5, j, size / 2 + 5);
      public void paint(Graphics g)
       f = ((3*c/a) - (b*b/a*a)) / 3;
       g = ((2*(b*b*b)) / (a*a*a)) - ((9*b*c)/(a*a)) + (27*d)/a)) / 27;
       h = ((g*g)/4) + (f*f*f)/27;
    public void actionPerformed(ActionEvent e) {
           if (e.getSource() == graphBtn) {
           a = Double.valueOf(aTxt.getText()).intValue();
           b = Double.valueOf(bTxt.getText()).intValue();
           c = Double.valueOf(cTxt.getText()).intValue();
           d = Double.valueOf(dTxt.getText()).intValue();
           if (aTxt.getText().equals("")) {
                a = 0;
           repaint();
    }Can anyone help please?

    The easiest + best way by far to solve polynomial problems is to use matrices.
    Search around on the web and see if you can find a matrix package - I think NASA had an open source free one; you might want to see if you can find that.
    Given
    |a b c|       |x|
    |d e f|    =  |y|
    |g h i|        |z|
    there is a formula that uses determinants somehow that finds the values of all the variables

  • How do I solve simultaneous equation with 3 unknowns ?

    I need to solve simultaneous equations with 3 unknowns . Can any body help out on how to go about this? Thanx.

    You did not specify what kind of equations you have....
    Are your equations linear? Check the linear algebra palette and a look at "solve linear equations:.
    LabVIEW Champion . Do more with less code and in less time .

  • Solve Linear Equations NaN return

    I've implemented a modified Linear Levenberg Marquardt function for gauss fitting of spectral data, but have problems from time to time where I simply can't fit a specific data set.
    I've traced the problem to the function "Solve Linear Equations" outputting NaN for one or more solution vectors (Not all) which then plays havok with my function.
    I've located a data set which is initially OK, but which after solving the linear equations has NaN as the second element of the solution vector array. Changing the matrix type to something other than "generic" gets rid of the NaN for this particular data set, but gives problems with others which work with the "generic" matrix type.
    Since my mathematics lectures in college are a few years away now, I'm asking someone out there if they can help me with my problem. I can supply a "corrupting" data set if this would help, or maybe someone knows this problem and has a work-around?
    I've thought of leaving the matrix type to "generic" and checking the output to see if there's a NaN present, and if so, then re-calculate with another matrix type until there's no NaN. This is most likely not very sound mathematically, but it might reduce the number of rogue data sets.
    Thanks in advance
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    Hi Altenbach,
    The data can have a significant amount of overlap. Typically three to four groups of peaks fully resolved, but each group can have up to 4-5 peaks in them, partially visible only as shoulders.
    The start value "problem" is more or less solved (but as usual, not yet finished).
    I've got an approximate first-guess peak find running which does a pretty good job of finding the peaks I need, and I then fit the height and FWHM first before doing a full optimisation (The Sub-VI approach allows much more flexible fitting models).
    The fitting works well on almost all data sets. There are simply some spectra which (although visibly hardly different to others which work perfectly) do not fit, i.e. generate the NaN response from the "solve linear equations" function. It's a numeric problem (bug?), I'm sure, and not strictly a peak location or resolution problem. then again, I may be wrong.
    I refer to the standard "LevMar" VI as being linear, because it assumes a linear relationship between the variable variation and the end mse used for optimisation. This is where the "Solve linear Equations" comes in. Since the relationship is almost certainly not linear (foe example when peaks overlap), I thought maybe the non-linear coefficient guess may yield better results. I've had a quick look through the non-linear LEV-MAR function, but don't understand it yet ot the extent I understand the linear one. It does indeed seem to take a slightly different approach (once you look past the whole parsing code of the "linear" function.
    I'll need some time to get some understanding of the non-linear code.
    Attached are some example spectra (One which works, and one which doesn't).
    Thanks again
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Spectra.zip ‏3 KB

  • Creating a graph based on a quadratic equation.

    Hello, I just got my first Mac and iWork 09.
    I'm trying to create a graph in Numbers 09 based on a quadratic equation however I cannot find any way of doing this.
    I just need to some simple graphs based on equations such as y = x^2 + 3x + 5
    How do I make this into a graph in Numbers 09?
    Oh and another question... If I have a graph with points based on X and Y data, can I turn the trend line into an equation?
    Thanks
    Message was edited by: conielo

    To create a scatter chart, you need two columns (or rows) of data, one being X and the other being Y. So, in Column B put the X values you would like plotted. In Column C put your equation to calculate Y for each of those points.
    B2 =1
    B3 =2
    etc
    C2 =B2^23*B25
    then fill down to fill in the rest of the rows in the column.
    I'd recommend a look at the Numbers user's manual if the above doesn't make sense.
    If you have plotted some X-Y data and want the trendline equation, you can turn on a trendline and have it display the equation. You can't use the coefficients from the equation unless you read them off the chart and type them into your table manually. However, you can calculate the trendline yourself in your table. That was covered in some depth in a thread from a little while back. Here's the link to that thread:
    http://discussions.apple.com/thread.jspa?messageID=9015541&#9015541

  • Solve 'String Equation' at the run time

    Can any one help me how to solve String Equation. I get equation and its respective values from database table and i want to solve the equation at run time.
    Ex: (round (x * y) / 1000) /1000
    Please help me as i am new to Java envionment.
    Thanks
    Raveesh

    For a small footprint Java interpreter have a look at BeanShell.
    kind regards,
    Jos

  • How to solve this equation?

    can anybody help me, solve this problem in as3 ?
    x+y+z=8000;
    0.17*x + 0.35*y +0.08*z =960
    thanks very much!!!

    this gives a little more explanation, although doesn't actually complete for me there are too many permitations
    you are also going to have to worry about the number representation issue using floating points numbers
    it might be better to convert the second equations to something equivalent which uses ints
    package
              import flash.display.Sprite;
              public class Main extends Sprite
                        //x+y+z=8000;
                        //0.17 * x + 0.35 * y +0.08 * z = 960
                        public function Main()
                                  // consider each equation in the form a.x + b.y + c.z = d
                                  // we have 3 unknowns x, y, z so we need 3 nested for loops to run over all possibilities
                                  // then the maximum value x can be is d/a
                                  // maximum y = d/b
                                  // maximum z = d/c
                                  // now if we have 2 equations we need to take the maximum for each known from either equation
                                  // so in your case with maximum x is the maximum of 8000/1 and 960/0.17 =
                                  // maximum y is the maximum of 8000/1 and 960/0.35
                                  // maximum z is the maximum of 8000/1 and 960/0.08
                                  // all these maximums should be rounded down to the nearest integer
                                  //max x = 8000
                                  //max y = 8000
                                  //max z = 12000
                                  //we use these maximum values for the nested for loop limits
                                  var maxX:int = Math.max(8000 / 1, 960 / 0.17);
                                  var maxY:int = Math.max(8000 / 1, 960 / 0.35);
                                  var maxZ:int = Math.max(8000 / 1, 960 / 0.08);
                                  trace("max values: ", maxX, maxY, maxZ);
                                  for (var i:int = 0; i < maxX; i++)
                                            for (var j:int = 0; j < maxY; j++)
                                                      for (var k:int = 0; k < maxZ; k++)
                                                                // this if statement is a representation of if the values for x, y and z we are trying
                                                                // actually solve the equations
                                                                // so in your case use the following
                                                                if ((i + j + k == 8000) && (0.17*i + 0.35*j + 0.08*k) == 960)
                                                                          trace("x=", i, ", y=", j, ", z=", k);
                                  trace("done");

  • Help with solving Riccati Equation

    Hoping someone can help me out with solving this equation.  The continous algebraic riccati equation is set up in the form A'*X + X*A - X*B*X + Q.     There is a riccati solver in the control and simuation toolkit but the equation is set up as A'*X + X*A - [X*B + N]*inv(R)*[X*B + N]' + Q = 0.  Default for R is just the identtity matrix, and default for N is empty matrix so does this reduce to A'*X + X*A - X*B*B'*X + Q  ?  (Not 100% on that.)   So is there anyway to use labviews CD Continuous Algebraic Riccati Equations VI on my equation?
    Thanks so much for any help.

    I think you are correct.  I think that technically the last X is transposed, but since X is symetric X' = X, so it makes no difference.

  • Solve linear equations vs pseudoinverse memory issues

    Hello,
    I am trying to solve a Ax
    = b system, and have setup my algorithm to use the LU decomposition
    followed by the appropriate use of the "Solve Linear Equations" VI. I
    then check the error output from this VI, and if there is an error I
    try using the "PseudoInverse Matrix" VI.
    I am doing this in a loop with a progressively larger matrix for each iteration.
    This
    works great EXCEPT for when my algorithm gets close to the maximum
    memory allowed (i.e. - the iteration BEFORE I get an error message
    stating that the VI has run out of memory).Then, although I do NOT get
    an error code from my "PseudoInverse Matrix" VI, the values output from
    this VI are complete garbage (really really large values).
    Has
    anyone come across a similar issue before? Is there a way around this?
    i.e. - I would like to know when/if the  "PseudoInverse Matrix" VI will
    not provide valuable data output so I can stop my algorithm the
    iteration beforehand.
    Thanks!

    Zamjir,
            Can you post the VI and the matrix needed to replicate the issue? I didn't find any other instances of this happening but that doesn't mean that it's not expected. I understand that things ramp up in memory and just before it tops out it shows large (not correct) values but I don't know if this is expected and is just LabVIEW's way of letting us know that it's about to error out (in case you wanted to build in a shut down program you could base it off of these large values) or if it is a bug. If you could post the code so I can take a look at it and also a screenshot of the "out of memory" error you see, I will see what I can find out for you. 
    Grant H.
    National Instruments
    LabVIEW Product Marketing Manager

  • Can labview solve this equation?

    Hello,
    I need to solve this equation in labview to t. X and Y are known values.
    And if this part can't be larger then 1. If it is, it should be made 1.
    I have really no idea where to begin to solve this problem.
    Thanks in advance!

    If you are actually trying to solve it recursively, then Newton's Method should work.
    Actually after checking it, it's obvious the that any value of t at the
    input will give you the correct value of t at the output.
    Message Edited by rpursley8 on 11-21-2005 12:09 PM
    Randall Pursley

Maybe you are looking for

  • Problem with Perl Function

    Hello, My MacBook Pro is running on Mac OS X v 10.6.5 (Snow Leopard), and I was trying to run a perl script on the terminal. The script contains perl functions, such as chomp, split, next; however, the perl in my MacBook could not read (recognize) th

  • Issue with dbadapter properties implementing, please its urgent.....

    Hi All, my scenario is polling data from one table and publishing in to jms queue. and I'am using FaultPolicies with retry (2) and interval time (2) and exponential Backoff-(3). when I configured DB Poll, the properties of maxrows (4), attempts (9),I

  • Mac won't let me move files into a folder bc it THINKS there are duplicate files - but they're not

    Mac won't let me move files into a folder bc it THINKS there are duplicate files - but they're not. There are hundreds of what it thinks are duplicates. How can I get it to let me put them all into a folder and create unique names? If I do one file a

  • Partitioning Thinkpad 530

    Hi Does anyone here like the recipe for how to use the recovery DVD's so I can get two or more partitions on the hard disk. I have chosen Win.7 and I don't want Win.8. I have tried to reduce the first partition, drive C, and then use the rest as driv

  • 9i r.2 doesn't support org.xml.sax.helpers classes

    I'm not able to load the following classes into Oracle 9i: org.xml.sax.helpers.ParserAdapter; org.xml.sax.helpers.ParserFactory; org.xml.sax.helpers.XMLReaderFactory; These classes are contained in the xmlparserv2.jar file which I've downloaded. Howe