Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: How do i make two equations have to be equal?

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default How do i make two equations have to be equal?

    Right now i am writing a program that will find the intersection point of two lines. My general equations are y=m1 * x + b1 and y = m2 * x +b2. I want to make m1 * x + b1 HAVE to equal m2 * x + b2, but i have no idea how to. Anyone have any suggestions?


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: How do i make two equations have to be equal?

    What are you stuck on, figuring out the mathematics of making equations equal or writing code to demonstrate the solution?

  3. #3
    Member
    Join Date
    Jun 2012
    Location
    Left Coast, USA
    Posts
    451
    My Mood
    Mellow
    Thanks
    1
    Thanked 97 Times in 88 Posts

    Default Re: How do i make two equations have to be equal?

    Quote Originally Posted by jamesR View Post
    ... Anyone have any suggestions?...
    My suggestion is to use algebra to derive arithmetic expressions for x and y in terms of m1, b1, m2, and b2.

    Then write a program that gets user input for values of m1, b1, m2, and b2 and then evaluates the expressions to calculate (and, presumably, print) values of x and y.


    Cheers!

    Z
    Last edited by Zaphod_b; October 3rd, 2012 at 01:35 PM.

Similar Threads

  1. Help writing if statement for two equal arrays
    By tuathan in forum Loops & Control Statements
    Replies: 1
    Last Post: June 29th, 2012, 09:57 AM
  2. Why does this equal that?
    By colerelm in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 27th, 2011, 06:20 PM
  3. equal symbol expected - where had I gone wrong?
    By tangara in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: September 14th, 2011, 09:01 PM
  4. string.equals(anotherString) Anything like this for doesn't equal?
    By Andyandhisboard in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 11th, 2011, 06:50 PM
  5. While JOptionPane equal Yes????
    By maximus20895 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 20th, 2010, 08:57 PM