Home / Expert Answers / Advanced Math / please-follow-the-format-of-script-thank-you-matlab-basics-for-derivatives-matlab-is-a-powerful-pr-pa201

(Solved): Please Follow the format of script, Thank you! MATLAB Basics for Derivatives MATLAB is a powerful pr ...




Please Follow the format of script, Thank you!

MATLAB Basics for Derivatives
MATLAB is a powerful programming language that is able to solve differential equations using a
Script
1% Initialize the variable and the functions
2
3 %Set your g(x) ad h(x) and m(x)
4 g(x) =
5 h(x)
=
6 m(x) =
7% Find th
MATLAB Basics for Derivatives MATLAB is a powerful programming language that is able to solve differential equations using a few codes. Some of which are diff and dsolve command diff Difference and approximate derivative. Example: syms x y(x). Defines the variable x for the differentiation and other operations. Also defines y as a function of x k diff(x^2) %Differentiates x^2. Will return 2"x I Dy = diff(y) % Sets Dy as the denivative of y(x). Equivalent to y Solve the following: (1) g(x)=tan(x), find g(x); (2) h(x) (sin(3x))/2x, find (x); (3) mx)-In(Tan-¹'x), find m(x) (4) Find Dy(x) given y(x), if Dy(x) = y(x) (5) Find D2y(x) given y(x), if D2y(x) = y(x) Script 1% Initialize the variable and the functions 2 3 %Set your g(x) ad h(x) and m(x) 4 g(x) = 5 h(x) = 6 m(x) = 7% Find the derivative of g(x). save answer as gp(x); 8 gp(x) = 9% Find the second derivative of h(x). save answer as hpp(x); 10 hpp (x) = 11 % Find the derivative of m(x). save answer as mp(x); 12 mp (x) 13 % Find the derivative of y and set it as Dy(x) 14 Dy(x) = 15 % Find the derivative of y and set it as D2y(x) 16 D2y (x)=


We have an Answer from Expert

View Expert Answer

Expert Answer


Matlab code: clc; clear; close all; syms x g(x) syms x h(x) syms x m(x)
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe