Question

3. (a) Write a MatLab program that calculates for the function F(x, y) = ln(x + Va,2-y2) The program should use pretty) to di

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

MATLAB Code:

close all
clear
clc

fprintf('Part (a)\n--------------------------------------\n')
syms x y
F = log(x + sqrt(x^2 + y^2));
fprintf('F(x,y) = \n')
pretty(F)
D2F = diff(diff(F, y), x);
fprintf('dF/dxdy = \n')
pretty(D2F)

fprintf('After using simplify():\n')
fprintf('F(x,y) = \n')
pretty(simplify(F))
fprintf('dF/dxdy = \n')
pretty(simplify(D2F))

fprintf('Part (b)\n--------------------------------------\n')
syms x
taylor_expansion = taylor(sqrt(1 + x))
te = @(x) (7*x^5)/256 - (5*x^4)/128 + x^3/16 - x^2/8 + x/2 + 1;
taylor_expansion_at_0 = te(0)
taylor_expansion_at_3 = te(3)

fprintf('\nPart (c)\n--------------------------------------\n')
syms x H(x)
G(x) = x^2 * (1 - x^2) * H(x);
fprintf('G(x) = \n')
pretty(G(x))
fprintf('dG/dxdx = \n')
pretty(diff(diff(collect(G(x)), x), x))

Output Screenshot:

Command Window Part (a) F(x,y) - log(x + sqrt(x dF/dxdy- y)) sqrt(x y I 2 2 3/2 (x +y) (x + sqrt(x y) sqrt(x + y) (x sqrt(x +

Add a comment
Know the answer?
Add Answer to:
3. (a) Write a MatLab program that calculates for the function F(x, y) = ln(x + Va,2-y2) The prog...
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
  • 4. Write a MatLab program that calculates the following indefinite integrals. The program should ...

    4. Write a MatLab program that calculates the following indefinite integrals. The program should use pretty() to display both the original integrand and the integrated result, and also us

  • Recall that the command diff(f(x),x) symbolically finds the derivative of the function f. Recall also that...

    Recall that the command diff(f(x),x) symbolically finds the derivative of the function f. Recall also that the derivative is itself a function which can also be differentiated, giving us the second derivative of f, and so on. MATLAB will easily compute higher order derivatives using the command diff(f(x),x,n) Where n represents which derivative you want. Later, it will be very useful to find patterns in higher order derivatives. Ordinarily, this is most easily done by NOT simplifying the resulting expression,...

  • # 2,3,4,7, 10,11,15,18) Differentiate the function: #2 f(x) = ln(22 + 1) #3 f@) = ln(cos)...

    # 2,3,4,7, 10,11,15,18) Differentiate the function: #2 f(x) = ln(22 + 1) #3 f@) = ln(cos) #4 f(x) = cos(In x) #7 f(x) = log2(1 – 3x) #10 f(t) = 1+Int #11 F(x) = In( 3+1") #18 y = (ln(1 + e*)] # 23) Find an equation of the tangent line to the curve y = In(x2 – 3) at the point (2,0). # 27, 31) Use the logarithmic differentiation to find the derivative of the function. # 27 y...

  • (y=2 • A region is bounded by 3 functions: {x = y2 as shown. Clearly x=y...

    (y=2 • A region is bounded by 3 functions: {x = y2 as shown. Clearly x=y construct a double integral to find its area using both dydx and dxdy orders. You do not need to evaluate the integral. 2

  • Create a CPP file for a C++ Program. Write exactly these functions, power(x,y) function and a...

    Create a CPP file for a C++ Program. Write exactly these functions, power(x,y) function and a print(text, number) function and the main() function. The power(x,y) function returns an integer result that is calculated by raising a number x (integer) to a power y (integer). The second argument y (exponent) of the function can not exceed 100. If the second argument exceeds 100, the function should return -1. Your power(x,y) function must be able to take either 1 or 2 integer...

  • Write a program that contains a main function, a “double custom_operator_function(int op_type, double x, double y)”,...

    Write a program that contains a main function, a “double custom_operator_function(int op_type, double x, double y)”, a “double min(double,double)”, a double max(double x,double y), and a double pow(double x, int y). The main function is used to call the custom operator function. Next, the custom operator function calls the min/max/pow functions based on the op_type. From the main, call the custom operator function with the three inputs 1/-3/5, 2/4/5, and 3/4/5. Print the result of each input to screen. i)...

  • write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle...

    write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle Objective: Write MATLAB scripts to solve differential equations. Implementation: MatLab is an ideal environment for solving differential equations. Differential equations are a vital tool used by engineers to model, study and make predictions about the behavior of complex systems. It not only allows you to solve complex equations and systems of equations it also allows you to easily present the solutions in graphical form....

  • This is the given code: /** * This program uses a Taylor Series to compute a...

    This is the given code: /** * This program uses a Taylor Series to compute a value * of sine. * */ #include<stdlib.h> #include<stdio.h> #include<math.h> /** * A function to compute the factorial function, n!. */ long factorial(int n) { long result = 1, i; for(i=2; i<=n; i++) { result *= i; } return result; } int main(int argc, char **argv) { if(argc != 3) { fprintf(stderr, "Usage: %s x n ", argv[0]); exit(1); } double x = atof(argv[1]); int...

  • Consider the function f(x) = e x a. Differentiate the Taylor series about 0 of f(x). b. ldentify ...

    Please answer all, be explanatory but concise. Thanks. Consider the function f(x) = e x a. Differentiate the Taylor series about 0 of f(x). b. ldentify the function represented by the differentiated series c. Give the interval of convergence of the power series for the derivative. Consider the differential equation y'(t) - 4y(t)- 8, y(0)4. a. Find a power series for the solution of the differential equation b. ldentify the function represented by the power series. Use a series to...

  • 8 pts Question 3 Consider the function f(x,y, 2)(x 1)3(y2)3 ( 1)2(y2)2(z 3)2 (a) Compute the...

    8 pts Question 3 Consider the function f(x,y, 2)(x 1)3(y2)3 ( 1)2(y2)2(z 3)2 (a) Compute the increment Af if (r,y, z) changes from (1,2,3 (b) Compute the differential df for the corresponding change in position. What does (2,3,4) to this say about the point (1, 2,3)? ( 13y2)3 ( 1)2(y 2)2(z 3)2 with C (c) Consider the contour C = a constant. Use implicit differentiation to compute dz/Ox. Your answer should be a function of z. (d) Find the unit...

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