Write the function, la, b] pade1(fin, m, x1, x2), that generates the Pade coeffi
ID: 3791033 • Letter: W
Question
Write the function, la, b] pade1(fin, m, x1, x2), that generates the Pade coefficient vectors a and b for the rational function approximation, f(x). Also, it should generate a plot displaying f(x) and f (x) for x E [x1 x2]. n and m are the order of the numerator and denominator of f x), respectively. f represents the (anonymous function) f (x) being approximated. Note: Your function pade1 should generate internally the required Maclaurin polynomial coefficients (Taylor series applied at the origin). You must not use the built-in Matlab function pade, i.e., your program is supposed to generate the required system of (m + n + 1)times (m + n + 1) equations and solve it. Test your function for f(x) = tan^-1(x), with n = 5 and m = 4 and [x1 x2] = [-3 3].Explanation / Answer
ans=
pi*k - asin(3^(1/2)/3)
asin(3^(1/2)/3) + pi*k
ans =
2*pi*k - 2*asin(3^(1/2)/3)
2*asin(3^(1/2)/3) + 2*pi*k
ans =
in(k, 'integer')
in(k, 'integer')
ans =
k
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.