Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following function: f(x, y) = x^2 + xy - 36y + xe^4x^2 + 9 Allow th

ID: 3109079 • Letter: C

Question

Consider the following function: f(x, y) = x^2 + xy - 36y + xe^4x^2 + 9 Allow the user to input values for both x and y as scalars. Only allow the function to evaluate if the value of x is less than or equal to y. If the function is evaluated, display the value of x and y as well as the function evaluation result using a single instruction. If not, show an appropriate error message to the user and do not allow the function to be evaluated. Evaluate your code at the following points: i. x = 5, y = 5 ii. x = 0.25, y = e^3x iii. x = 0.2, y = Squareroot x - 0.01 iv. x = 1, y = 5

Explanation / Answer

matlab code::::

  

x=input('Enter the x value :: ');
y=input('Enter the y value :: ');

    if (x<=y)
        f=x^2-x*y-36*y+x*exp(4*x^2)+9 ;
        fprintf('output of the function is %f ',f)
  
    else
        fprintf('your entered value is not satisfy the given condition');
    end

outputs :::

1) Enter the x value :: 5
Enter the y value :: 5
output of the function is 134405857090806780000000000000000000000000000.000000

2) Enter the x value :: 0.25
Enter the y value :: exp(3*x)
output of the function is -67.357744

3) Enter the x value :: 0.2
Enter the y value :: sqrt(x-0.01)
output of the function is -6.504512

4)Enter the x value :: 1
Enter the y value :: 5
output of the function is -120.401850

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote