Question

3 Programming For the equation v 2 exp(3 4 write a program to solve for the first positive root. Describe the error in your solution.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

/* This program is written in c++ for the equation y=-2exp(3-x)-4*

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
//y=-2exp(3-x)-4
clrscr();
double x,y;
cout<<"enter the value of x";
cin>>x;
y= 2*exp(3-x)-4;
cout<<"The value of y is %f"<<y;
getch();
}

For the different values of x, y returns only negative value because for all positive values of x, y values falls in third quadrent of graphes where all values of y will be negative always.

For all negative values of x, It also returns the negative value.

This equation graph is:-->

x: -2.91666667 y: -746.344816 10 -8 6 -2 2 4 681012 20000 -40000 60000 80000

Add a comment
Know the answer?
Add Answer to:
For the equation y = -2 exp(3 - x) - 4 write a program to solve...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2...

    Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2 +3x−7 Calculate the accuracy of the solution to 1 × 10−10. Find the number of iterations required to achieve this accuracy. Compute the root of the equation with the bisection method. Your program should output the following lines: • Bisection Method: Method converged to root X after Y iterations with a relative error of Z.

  • question number 2 1. Write a computer program to solve the equation x = tan x...

    question number 2 1. Write a computer program to solve the equation x = tan x by means of Newton's method. Find the roots nearest 4.5 and 7.7. ( 2. (Continuation) Write and test a program to compute the first ten roots of the equation tan x =x. (This is much more difficult than the preceding computer problem.) Cultural note: If a1, a2, ... are all the positive roots of this equation, then Zie A2 = 1/10. (Amer. Math. Monthly,...

  • [1+1 Write a program to solve the equation y = sqrt(5 {x}^{5) + 3 {x}^{4} +...

    [1+1 Write a program to solve the equation y = sqrt(5 {x}^{5) + 3 {x}^{4} + 10). a) In the function, you should take the value of the integer from the user b) The value of x should be between 1 and 9. Make sure that the user has not entered a valid value. c) Calculate the value according to the formula and print it on the screen. d) The value of the output variable y should be printed only...

  • please help to solve this differential equation. 3. Use power series solutions to solve (x+1)y"+(x-2)y' +y...

    please help to solve this differential equation. 3. Use power series solutions to solve (x+1)y"+(x-2)y' +y = 0. Center the power se- ries about the ordinary point o = 0. Write the solution as y = col first four terms..]+ ciſfirst four terms...). 4. Find the minimum radius of convergence for a power series solution to the ODE (22+2x+5)/' +10y = 0 centered about the ordinary point Xo = -6

  • question 3 please The first 5 questions refer to finding solutions to the equation exp(w) =...

    question 3 please The first 5 questions refer to finding solutions to the equation exp(w) = 3.8 ln(1+x). You will need to write it in the form f(x)-0, and use various root finding methods. 1. (10 pts) Plot the curves y- exp(Vx), and y 3.8 ln(1+x) on the same graph in the range 0 x 6. Read off intervals in which there are roots of the equation exp(k)- 3.8 In(1+x) Now find the roots to 6 decimal places using the...

  • Write a Maple program to solve analytically the ordinary differential equation dy dt = y 2...

    Write a Maple program to solve analytically the ordinary differential equation dy dt = y 2 + 1 with initial condition y(0) = 0. What solution is found? Verify (on paper) that the solution found satisfies the differential equation and initial condition.

  • Solve the following: 1. x*y'-2*y-2*x^2*y 2. y xty/(x-5) 3. y'y/x, y(1)-2 4. yy+2*exp(2*x), y(0)=3 5. (1+x)*y+ysi...

    Solve the following: 1. x*y'-2*y-2*x^2*y 2. y xty/(x-5) 3. y'y/x, y(1)-2 4. yy+2*exp(2*x), y(0)=3 5. (1+x)*y+ysin(x), y(-pi/2)=0 1. x*y'-2*y-2*x^2*y 2. y xty/(x-5) 3. y'y/x, y(1)-2 4. yy+2*exp(2*x), y(0)=3 5. (1+x)*y+ysin(x), y(-pi/2)=0

  • 3. Given the equation: y = (x + 2)2 - 4 a. (3 pts) Identify the...

    3. Given the equation: y = (x + 2)2 - 4 a. (3 pts) Identify the vertex. b. (3 pts) Describe the transformation. 4. Mario buys tickets for a Denver Nuggets basketball game. The tickets sell for either $47 or $57. He purchases 14 tickets and pays a total of $738. How many tickets did he purchase at each price? a. (2 pts) Write one equation for the total number of tickets and one equation for the total cost of...

  • A first order linear equation in the form y p(x)y = f(x) can be solved by...

    A first order linear equation in the form y p(x)y = f(x) can be solved by finding an integrating factor u(x) = exp c) dx (1) Given the equation y 2xy = 10x find H(x) = (2) Then find an explicit general solution with arbitrary constant C у %3 (3) Then solve the initial value problem with y(0) = 3 A first order linear equation in the form y p(x)y = f(x) can be solved by finding an integrating factor...

  • A first order linear equation in the form y′+p(x)y=f(x) y p x y f x can be solved by finding an integrating factor μ(x)=...

    A first order linear equation in the form y′+p(x)y=f(x) y p x y f x can be solved by finding an integrating factor μ(x)=exp(∫p(x)dx) μ x exp p x d x (1) Given the equation y′+6y=4 y 6 y 4 find μ(x)= μ x (2) Then find an explicit general solution with arbitrary constant C C . y= y . (3) Then solve the initial value problem with y(0)=3 y 0 3 y= y .

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT