1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Veronika [31]
3 years ago
9

Use the Bisection Method to find the root 2. Write a main program and a function program 3. Main Program a. define constants b.

define es c. define function handle for the function you are finding the root for. Note that the function handle you define will be a function of S and t, i.e. f(S,t) d. define Sl and Su e. t will go from 0 days to 40 days. Use 40 values for t f. use a for loop (inside main program) to loop through the values of t (one at a time) to generate a vector for S (one value at a time). Note that each value of t will give a different value for S g. use a convergence criteria corresponding to 6 significant figures h. generate plot of S vs t 4. Function Program an. algorithm for Bisection Method
Computers and Technology
1 answer:
MissTica3 years ago
5 0

Answer:

// C++ program for implementation of Bisection Method for  

// solving equations  

#include<bits/stdc++.h>  

using namespace std;  

#define EPSILON 0.01  

// An example function whose solution is determined using  

// Bisection Method. The function is x^3 - x^2 + 2  

double func(double x)  

{  

return x*x*x - x*x + 2;  

}  

// Prints root of func(x) with error of EPSILON  

void bisection(double a, double b)  

{  

if (func(a) * func(b) >= 0)  

{  

 cout << "You have not assumed right a and b\n";  

 return;  

}  

double c = a;  

while ((b-a) >= EPSILON)  

{  

 // Find middle point  

 c = (a+b)/2;  

 // Check if middle point is root  

 if (func(c) == 0.0)  

  break;  

 // Decide the side to repeat the steps  

 else if (func(c)*func(a) < 0)  

  b = c;  

 else

  a = c;  

}  

cout << "The value of root is : " << c;  

}  

// Driver program to test above function  

int main()  

{  

// Initial values assumed  

double a =-200, b = 300;  

bisection(a, b);  

return 0;  

}  

You might be interested in
Query " frosty the snowman
julsineya [31]
I don't think that is a query...
5 0
3 years ago
Print numbers 0, 1, 2, ..., userNum as shown, with each number indented by that number of spaces. For each printed line, print t
geniusboy [140]

Answer:

Please find the answer below

Explanation:

// Online C compiler to run C program online

#include <stdio.h>

int main() {

   // Write C code here

   //printf("Hello world");

   int userNum;

   int i;

   int j;

   

   scanf("%d", &userNum);

   /* Your solution goes here */

   for(i = 0; i<=userNum; i++){

       for(j = 0; j <= i; j++){

           printf(" ");

       }

       printf("%d\n", i);

   }

   return 0;

}

8 0
2 years ago
Which method adds 10 to the right end of the array?<br> myArray.<br> insert<br> (10)
vladimir1956 [14]

JavaScript has a set of mutator functions that allow you to modify the contents of an array without referencing the individual elements.To add to to myArray we us the push() method

<h3>Adding Elements to an Array</h3>

To add to to myArray we us the push() method

(10)

myArray.push(10)

There are two mutator functions for adding elements to an array: push() and unshift(). The push() function adds an element to the end of an array:

var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums.push(6);

print(nums); // 1,2,3,4,5,6

var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums[nums.length] = 6; print(nums); // 1,2,3,4,5,6

Learn more about arrays here:

brainly.com/question/24275089

6 0
2 years ago
You may save more money by using a a0 service, but you will spend more time on creating a contract.
Anon25 [30]

Answer:

contractor management outsourcing

Explanation:

For any recruiter, two things are important. They want to ensure more time, and hence more money. By the time I mean, they want to avoid investing time in something that does not generate revenues. And unfortunately, there exists a bundle of such irrelevant, and yet must-do activities which we need to perform. However, if we opt for contractor management outsourcing to a better management employment relationship, we save a lot of time and earn more as a recruiter. However, we then spend more time creating a contract, as even a single faulty clause can be hard for you to engulf in the future. And that is why it requires more time. However, the good part is, we as a recruiter are happy by the end of the day, as we earn more profit. And it's due to better resource and time management.

3 0
3 years ago
Why is the keyboard calledQWERTY
taurus [48]
The standard QWERTY layout keyboard is called 'QWERTY' because on the top line of the keyboard the first 6 letters from chronological left to right order are; Q, W, E, R, T, and Y.

Or...if you're wondering why it's QWERTY and not ABCDEF, it's because when typing with the alphabetical format, many of the keys would clash with each other due to the arrangement of keys on the original typewriter. The QWERTY layout became so popular, it was the standardized layout for typewriters, and even keyboards today.
4 0
3 years ago
Read 2 more answers
Other questions:
  • The range A2:B4 has how many cells?<br><br> Answers:<br> 2,4,6,8
    10·2 answers
  • Web design people please help!
    7·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • The right headlight does not function on either high or low beam. Technician A says this could be caused by an open ground on th
    12·1 answer
  • A group of students are collaborating on an online research project. What is an example of appropriate online behavior?
    10·2 answers
  • This method of advertising is expensive but can be the most effective method.
    15·1 answer
  • A noisy signal has been uploaded to D2L in the files fft_signal.mat and fft_signal.txt.Write a program to estimate the power spe
    10·1 answer
  • In two to three sentences, describe one advanced search strategy and how it is useful.
    13·1 answer
  • Firestick optimizing system storage and applications
    14·1 answer
  • WHO WANT P O I N T S.................................................
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!