please help me using C++ to solve the problem below
Use the bisection algorithm to find an approximate
solution z to the equation
x^(5.3) + (3.5)^x = N where N is your 7-digit phone number,
and:
(a) z is correct to 2 significant figures.
(b) z is correct to 2 decimal places.
`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
1)
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
#define EPSILON 0.01
const int N=1234567;
// An example function whose solution is determined using
// Bisection Method. The function is x^3 - x^2 + 2
double func(double x)
{
return pow(x,5.3)+pow(3.5,x)-(double)N;
}
// 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 ";
return;
}
double c = a;
while ((floor(b)-floor(a))!=0)
{
// 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 =0, b = N;
bisection(a, b);
return 0;
}

2)
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
#define EPSILON 0.01
const int N=1234567;
// An example function whose solution is determined using
// Bisection Method. The function is x^3 - x^2 + 2
double func(double x)
{
return pow(x,5.3)+pow(3.5,x)-(double)N;
}
// 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 ";
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 =0, b = N;
bisection(a, b);
return 0;
}

Kindly revert for any queries
Thanks.
please help me using C++ to solve the problem below Use the bisection algorithm to find...
Could you please help me to solve the problem. Also, could you please answer questions in clear hand-writing and show me the full process, thank you (Sometimes I get the answer which was difficult to read).Thanks a lot Suppose we are comparing implementations of two algorithms on the same machine. For input size of n, Algorithm A runs in 8n^2 steps, while Algorithm B runs in 64nlog2(n) steps. For what value n>2, where n is an integer, does Algorithm A...
Could you please help me to solve the problem. Also, could you please answer questions in clear hand-writing and show me the full process, thank you (Sometimes I get the answer which was difficult to read).Thanks a lot What is the smallest positive value of n, where n is an integer, such that Algorithm A, whose running time is 100n2 runs faster than Algorithm B, whose running time is 2n , on the same machine (give your answer in whole number(s))
Can you please help me solve this question using clear detailed
steps indicating the part number beside every
answer
Note: i will be giving a thumbs up to the best answer
:)
thank you!
If the series yx)is a solution of the differential equation ly" - 2x2y + 2y 0, then a+2 Cn,n- 1,2, A general solution of the same equation can be written as y(x)-Coyi(x)+cy2(x), where Calculate a2 a4 b3
If the series yx)is a solution of the differential...
Please find the complexity of the algorithm used to solve the problem below. Also find the approximate problem size we could solve in time t, given that we double the speed of the original machine. Thank you Suppose that a computer can run an algorithm on a problem of size 1,024 in time t. We do not know the complexity of the algorithm. We note that when we run the same algorithm on a computer 8 times faster, in the...
can
someone please help me solve these problem in c++ language and
leave useful comments below so i can follow along and know what i
am doing
/view wa New Tab CSSO IDE 15 THE DIGIT SWAP PROBLEM Write a function named swapDigitPairs() that accepts a positive integer n as an input-output parameter which is changed to a new value similar to n's but with each pair of digits swapped in order. For example: int n = 482596; int old...
I need help with solving this
step by step, please help me solve these step by step and with
explanation, please do It on paper and not typed up because it is
really confusing when typed up
format and your Solve the following problems. Your solutions should be in the final answers should have the correct units and number of significant figures. 58. proper What mass of Mg(OH), will dissolve in 1.0 L of 0.050 mol/L solution of MgSO4a? (9...
Not in C++, only C code please
In class, we have studied the bisection method for finding a root of an equation. Another method for finding a root, Newton's method, usually converges to a solution even faster than the bisection method, if it converges at all. Newton's method starts with an initial guess for a root, xo, and then generates successive approximate roots X1, X2, .... Xj, Xj+1, .... using the iterative formula: f(x;) X;+1 = x; - f'(x;) Where...
Note: Course: Discrete-time Signal Processing. Please help me to solve this problem step-by-step process. And thank you for your great time and support. 6. For a LTI causal system, the difference equation is given as y[n] = x[n] + 0.75y[n-1]-0. 125y[n-2] Find H(z) Plot the zeroes and poles of H(z) and specify the ROC. Find y[n] for x[n]-o[n]. What kind of a system is this? High pass, Low pass, Band pass, etc.
please help me solve
is 0 correct?
Use the gradient to find the directional derivative of the function at P in the direction of Q. g(x, y, z) = xyeloz, P(4, 20, 0), Q(0,0,0) 0
Please help me to solve this Algorithm question
Show that 3n^3 +/2 - 17 = theta(n^3) Show that 2n^3 + 1 notequalto 0(n^2)