Calculus MAT1011 Lab 3.docx - Name ANMOL BANSAL...

• 5

This preview shows page 1 - 5 out of 5 pages.

Name: ANMOL BANSAL Registration Number: 19BCE0630 SLOT: ELA- L15+L16 EXPERIMENT 3-A Dated: 4/9/2019 TAYLOR SERIES Question 1. Expand f(x,y) = e x log(1+y) in terms of x and y upto the terms of third degree using Taylor Series. 2. Expand e xy in Taylor Series the neighbourhood of (1,1) Program/Code: clc clearvars close all syms x y f = input(‘Enter the function f(x,y): ‘); I = input(‘Enter the point [a,b] at which Taylor series is to be sought: ‘); a=I(1); b=I(2); n=input(‘Enter the order of series’); tayser = taylor(f,[x,y],[a,b],’order’,n); subplot(1,2,1); ezsurf(f); subplot(1,2,2); ezsurf(tayser);
1. 2.
Name: ANMOL BANSAL Registration Number: 19BCE0630 SLOT: ELA- L15+L16 EXPERIMENT 3-B Dated: 11/9/2019 MAXIMA AND MINIMA OF FUNCTIONS OF TWO VARIABLES Question: 1. Find the maxima and minima of f(x,y)=x 3 +3xy 2 -15x 2 -15y 2 +72x Program/Code: clc clear all syms x y f= input('Enter the function f(x,y):'); p= diff(f,x); q=diff(f,y); [ax,ay]=solve(p,q); ax=double(ax);ay=double(ay); r= diff(p,x); s=diff(p,y); t =diff(q,y);D=r*t-s^2; figure ezsurf(f); legstr={'Function Plot'};% for Legend for i=1:size(ax) T1=subs(D,{x,y},{ax(i),ay(i)}); T2=subs(r,{x,y},{ax(i),ay(i)}); T3=subs(f,{x,y},{ax(i),ay(i)}); if (double(T1) == 0) sprintf('At (%f,%f) further investigation is required', ax(i),ay(i))
• • • 