



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Aplicacion de la serie de Taylor en lenguaje de programación MATLAB
Typology: Study Guides, Projects, Research
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Teorema de Taylor:
Sea f Cn^ [a,b] y supongamos que f n^ existe en [a,b] entonces para todo x ∈ [a, b] sea x 0 [a,b] existe un ξ(x) en [a,b] tal que f (x) = Pn(x) + Rn(x) con x ≤ ξ(x) ≤ x 0 donde:
Pn(x) = ∑^ n k=
f (^) (kx 0 )(x − x 0 )k k! (1)
Pn(x) = f(x 0 ) + f (^) (′x 0 )(x − x 0 ) + f ′′ (x 0 )^ (x^ −^ x^0 )
2 2! +^...^ +^ f^
(n) (x 0 )
(x − x 0 )n n! (2)
Rn(x) = f^
n+1(ξ(x))(x − x 0 )n (n + 1)! (3)
A P(x) se le conoce como el n´esimo polinomio de Taylor y Rn(x) como al n´esimo residuo cuando n− > ∞, Pn se le llama SERIE DE TAYLOR.
f(x) = x^2 ∗ sin(x) (4)
function [] =SerieTaylor1()
format compact syms x;
%Obtencion de derivadas de la funcion f=(x^2*sin(x)); diff1=diff(f) diff2=diff(f,2) diff3=diff(f,3) diff4=diff(f,4)
%Evaluar en la funcion y sus derivadas alrededor de x=pi/ x=pi/4;; f0=eval(f); f1=eval(diff1); f2=eval(diff2); f3=eval(diff3); f4=eval(diff4);
%Polinomios de Taylor de grado 1,2,3 y 4 x0=pi/4; syms x; P1=f0+f1*(x-(x0)); b1=vpa(expand(P1)); a1=simplify(b1); fprintf(’\nPolinomio 1: \n’) pretty(a1)
P2=P1+(f2*((x-x0)^2)/2); b2=vpa(expand(P2)); a2=simplify(b2); fprintf(’\nPolinomio 2: \n’) pretty(a2)
P3=P2+(f3*((x-x0)^3)/6); b3=vpa(expand(P3)); a3=simplify(b3); fprintf(’\nPolinomio 3: \n’) pretty(a3)
P4=P3+(f4*((x-x0)^4)/24); b4=vpa(expand(P4)); a4=simplify(b4); fprintf(’\nPolinomio 4: \n’) pretty(a4)
Figura 1: Polinomios de Taylor f (x) = x^2 ∗ sin(x)
Figura 2: Gr´afico f (x) = x^2 ∗ sin(x)
f(x) = x^2 ∗ ln(x) (5)
function [] =SerieTaylor2() syms x; %Obtencion de derivadas de la funcion. f=(x^2*log(x)); diff1=diff(f); diff2=diff(f,2); diff3=diff(f,3); diff4=diff(f,4);
%Evaluar en la funcion y sus derivadas alrededor de x=pi/ x=1; f0=eval(f); f1=eval(diff1); f2=eval(diff2); f3=eval(diff3); f4=eval(diff4);
x0=1; syms x; %Polinomios de Taylor de grado 1,2,3 y 4 P1=f0+f1*(x-(x0)); a1=expand(P1); fprintf(’\nPolinomio 1: \n’) pretty(a1)
P2=P1+(f2*((x-x0)^2)/factorial(2)); a2=expand(P2); fprintf(’\nPolinomio 2: \n’) pretty(a2)
P3=P2+(f3*((x-x0)^3)/factorial(3)); a3=expand(P3); fprintf(’\nPolinomio 3: \n’) pretty(a3)
P4=P3+(f4*((x-x0)^4)/factorial(4)); a4=expand(P4); fprintf(’\nPolinomio 4: \n’) pretty(a4)
%Obtencion de grafica x =0:0.1:50; f=(x.^2.*log(x)); plot(x,f) grid on
Figura 3: Polinomios de Taylor f (x) = x^2 ∗ ln(x)
Figura 4: Gr´afico f (x) = x^2 ∗ ln(x)