Linear approximation

Joined
Oct 12, 2019
Messages
11
Hope this is the right section for this question.

Approximate the biggest deviation of abs(f(x,y)-L(x,y)) for 0.9<=x<=1.1 , 3.9<=y<=4.1 where f(x,y)=3+41x-9*y+8*x^2-14*x*y+3*y^2.
The previous problem was to decide L(x,y) at the point (1,4) and i got L(x,y) = x+y+3.
I have tried to solve this in matlab and also used wolfram alpha but i dont get the right answer.
Could someone try this and see what the biggest deviation is?

In matlab i tried the following:
f=@(x,y)3+41.*x-9.*y+8.*x.^2-14.*x.*y+3.*y.^2;
dfdx=@(x,y)41+16.*x-14.*y;
dfdy=@(x,y)-9-14.*x+6.*y;
L=@(x,y,a,b)f(a,b)+dfdx(a,b)*(x-a)+dfdy(a,b)*(y-b);
a=1;b=4;


x1=linspace(0.9,1.1,20);
y1=linspace(3.9,4.1,20);

f1=f(x1,y1);
L1=L(x1,y1,a,b);
skillnad=abs(f1-L1);
plot(skillnad);

and the biggest deviation seemed to be 0.03 but it was the wrong answer.
If anyone could see what i did wrong i would really appreciate if u could tell me!
 

Attachments

  • Skärmbild (154).png
    Skärmbild (154).png
    134.6 KB · Views: 0
Last time i asked a similar question i got 0 answers so i would really appreciate if someone gave their time!
We have volunteer tutors who answers questions according to their expertise, interest and available time. I am assuming for your problem we do not have any volunteer meeting all 3 criteria.

Sorry .....
 
Top