Question Details

(Solved) public class BisectionMethod { public static void main(String args) { final double epsilon = 0.00001; double a, b, m, y_m, y_a; a = 0; b = 4; while (...


Hello,

I'm working an assignment today and have to do a program called "Trisection Method". It's basically another way of finding the root of an equation but using computers instead of doing it by hand. I have gone over the "Bisection" method in class and this was one of the codes that I had to work with (See attachment). So my question is: if I split the interval into 3 equal pieces (as opposed to two), how should I approach this? My textbook was suppose to give us a template for the Bisection method but apparently it doesn't have any files for Java, which I'm currently using.

public class BisectionMethod {
public static void main(String args) {
final double epsilon = 0.00001;
double a, b, m, y_m, y_a;
a = 0;
b = 4;
while ( (b-a) > epsilon){
m = (a+b)/2; //This is the midpoint.
y_m = m*m - 3.0; // y_m = f(m).
y_a = a*a - 3.0; // y_a = f(a).
if ((y_m > 0 && y_a <0) || (y_m <0 && y_a >0)){
} b=m;
else { a=m;
}
System.out.println("New interval: [" + a +
" .. " + b + "]");
}
System.out.println("Approximate solution = " +
(a+b)/2);
} }

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Sep 05, 2019

PRICE: $15

Solution~000200076739.zip (25.37 KB)

Buy this answer for only: $15

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy from our tutoring website www.aceyourhomework.com (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Sep 05, 2019

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN YOUR SET DEADLINE.

Order Now