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
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
ADVERTISEMENT