I was wondering if someone could tell me how to write a program for the following.
It is to print out all the values of the equation y=x^2+3x+2, and its derivative, y'=2x+3 for values between x=-5 to 5. Incrementing by 0.5.
Printable View
I was wondering if someone could tell me how to write a program for the following.
It is to print out all the values of the equation y=x^2+3x+2, and its derivative, y'=2x+3 for values between x=-5 to 5. Incrementing by 0.5.
This sounds like a homework problem, so I'll give you as much coding help as I
can. Well, here goes for the first few values:
#include <stdio.h>
int main() {
printf("12, -7\n8.75, -6\n6, -5\n3.75, -4\n"
"2, -3\n0.75, -2\n0, -1\n-0.25, 0\n"
"0, 1\n0.75, 2\n2, 3\n3.75, 4\n");
// You can fill in the rest
}
Regards
Paul