Question

C program language

Plot the function y = x4 - x2 over the range -1 .2 < x < +1 . 2 Choose the y-axis scale so that the function can be seen everywhere over this x-range and yet is not so small that details are hard to see.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer :

C Code:

#include <stdio.h>
#include <math.h>
int main()
{
float x,y;
for(x=-1.2;x<=1.2;x=x+0.2)
{
y=pow(x,4)-pow(x,2);
printf("x=%f, y=%f",x,y);
printf("\n");
}
return 0;
}

Add a comment
Know the answer?
Add Answer to:
C program language Plot the function y = x4 - x2 over the range -1 .2...
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
  • Problem 2. This is adapted from our textbook. Let X -[x1,x2, x3,x4 be a set of...

    Problem 2. This is adapted from our textbook. Let X -[x1,x2, x3,x4 be a set of four monetary prizes, where 0 < x1 < x2 < 13 < x4. Stowell claims he is an expected utility maximizer. He is observed to choose the lottery π-(1, 1, 1, ) over the lottery π,-(0Ί, , Ỉ ). Based 1 11 7 4 24 24) Based on that observation, can you conclude that he is truly an expected utility maximizer, as he [10...

  • Evaluate the line integral of the function f(x,y)= (x+y2)/(sqrt(1+x2)) over the curve C: y=x^2/2 ; from (1,1/2) to (0,0)

    Evaluate the line integral of the function f(x,y)= (x+y2)/(sqrt(1+x2)) over the curve C: y=x^2/2 ; from (1,1/2) to (0,0)

  • 1. Find the area under the graph of y = 1 + x2 over the interval...

    1. Find the area under the graph of y = 1 + x2 over the interval [1, 12] 2. Find: (-) (2x3 - *** -* - x - 1)dx = What can you say about the area between this polynomial and the x-axis over [-1, 1]?

  • 1) find the vertex and axis of symmetry of the graph of the function. 2) determine...

    1) find the vertex and axis of symmetry of the graph of the function. 2) determine the domain and the range of the function. 3) State whether the function is a polynomial function or not. If it is, give its degree. If it is not, tell why not. 4) For the polynomial, list each real zero and it’s multiplicity. Determine whether the graph crosses or touches the x–axis at each x-intercept. vertex and axIS oF Sm f(x) = x2 +...

  • 119 Reference Page - PRECALCULUS AND COLLEGE ALGEBRA Starting with the reference function y=x2, rewrite the...

    119 Reference Page - PRECALCULUS AND COLLEGE ALGEBRA Starting with the reference function y=x2, rewrite the function and plot, based on the adjustments given. 1. Translate the reference function left. New function, y--- 2. Translate the reference function 3 down and 4 right. New function, y=--- 3. Translate the reference function 4 left and reflect about x axis. New function, y=- 120 - Reference Page PRECALCULUS AND COLLEGE ALGEBRA Starting with the reference function y=x3, rewrite the function and plot,...

  • I. For the function. /(x) -X-4X+2XY+2Y+2Y+14 a. Plot the surface function for X over [5 6]. and Y...

    Please use matlab for the following problem I. For the function. /(x) -X-4X+2XY+2Y+2Y+14 a. Plot the surface function for X over [5 6]. and Y over [-4, -2]. ecolour plot for X over [O 101 and Yover [43] and values for the contours of V [1 1.25 1.5 22.5 3] c. Write an m-file to find the minimum of the function using the gradient descent method Use a starting value of [4, -4]. I. For the function. /(x) -X-4X+2XY+2Y+2Y+14 a....

  • 8) [10 POINTS] Plot the implicitly defined function x2 – y4 = 0 over the domain...

    8) [10 POINTS] Plot the implicitly defined function x2 – y4 = 0 over the domain (-21, 211]. (HINT: Using the ezplot command in MATLAB 9) [10 POINTS] -N -N+1 N Compute the x(w) for different values of N, i.e. N=2, 30, 40, 100. Plot the magnitude and the phase for these different N values. How does the graphs of Fourier Transform and original function in Matlab as the value of N changes? Please, explain.

  • 1). For the function, f(x) X-4X+2XY+2Y2+2Y+14 a. Plot the surface function for X over [5 61, and ...

    1). For the function, f(x) X-4X+2XY+2Y2+2Y+14 a. Plot the surface function for X over [5 61, and Y over [-4,-2]," b. Draw the contour plot for X over [0 10], and Y over [-4,-2] and values for the contours 1.25 1.5 2 25 3 of V c. Write an m-file to find the minimum of the function using the gradient descent method. Use a starting value of [4,-4]. 1). For the function, f(x) X-4X+2XY+2Y2+2Y+14 a. Plot the surface function for...

  • You can use MATLAB to solve problems (where appropriate). Problem 1 Consider function y = x4...

    You can use MATLAB to solve problems (where appropriate). Problem 1 Consider function y = x4 Q.1 Is the function single valued, multi-valued, or neither? a) The function is single valued. b) The function is multi-valued c) Neither Q.2 Is the function even, odd, or neither? a) The function is even function. b) The function is odd function c) The function is neither even nor odd function Q.3 Determine the inverse function of function y x*. a) The inverse function...

  • please explain how to do step 5 in matlab commands. med at x=c. 2 The first derivative Ne Scr We investigate the function f(x) 4 12x3+9x2. >> x-linspace (-3,3) >> y-41x.^4-12*x.^3 &gt...

    please explain how to do step 5 in matlab commands. med at x=c. 2 The first derivative Ne Scr We investigate the function f(x) 4 12x3+9x2. >> x-linspace (-3,3) >> y-41x.^4-12*x.^3 >> plot (x,y), grid 9*x."2; + A plot over the interval I-3,3] reveals an apparent "flat section"' with no visible relati extrema. To produce a plot that reveals the true structure of the graph, we replot over the interval [-1,2]: >> x=linspace (-1,2); >> y= 4 * x. ^4-12*x.^3...

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