# Ejercicios de matlab

Páginas: 4 (818 palabras) Publicado: 13 de febrero de 2010
TALLER DE MATLAB
RICHARD RIVERO ARAUJO cód.: 0520410022
HERRAMIENTAS COMPUTACIONALES APLICADAS A LA ECONOMÍA (*MATLAB*)
JOSE JAVIER MELGAREJO
(Docente)
Ejercicios # 1(h) y # 2(h2)
M FILE
syms x
h=sym('(x^2+x)*(x^2-x+1)/x^4')
der_h=diff(h)
pretty(h)
int_h=int(h)
pretty(int_h)
h2=sym('(sin(x)-x*cos(x))')der_h2=diff(h2)
pretty(h2)
int_h2=int(h2)
COMMAND WINDOW
(X^2+x)*(x^2-x+1)/x^4
der_h =
(2x+1)(x^2-x+1)/x^4+(x^2+x)(2x-1)/x^4-4(x^2+x)(x^2-x+1)/x^5
2 2
(x + x) (x - x + 1)
4
Xint_h =
X-1/2/x^2
x - 1/2 ----
2
x
h2 =
(Sin(x)-x*cos(x))
der_h2 =
X*sin(x)
sin(x) - x cos(x)
int_h2 =
-2cos(x)-xsin(x)
Ejercicio # 3
Mfile
syms xh3=sym('e^(3x+2)-e^(3x^(3)-3)/x^4')
der_h3=diff(h3)
pretty(h3)
pretty(der_h3)
int_h3=int(h3)
pretty(int_h3)
Command window
h3 =
e^(3x+2)-e^(3x^(3)-3)/x^4
der_h3 =3e^(3x+2)log(e)-9e^(3x^3-3)/x^2log(e)+4e^(3x^3-3)/x^5
3
(3 x - 3)
(3 x + 2) e
e - -----------
4
x
3 3
(3 x - 3) (3 x - 3)
(3 x + 2) e log(e) e
3 e log(e) - 9------------------ + 4 -----------
2 5
x x
int_h3 =-1/3e^2/log(e)(1-exp(3xlog(e)))+1/e^3log(e)(1/3/x^3/log(e)+1-3log(x)-log(3)-ipi-log(log(e))-1/6/x^3/log(e)(6x^3log(e)+2)+1/3/x^3/log(e)exp(3x^3log(e))+log(-3x^3log(e))+Ei(1,-3x^3log(e)))
2 /
e (1 - exp(3 x log(e))) | 1
- 1/3 ------------------------ + log(e) |1/3 --------- + 1 - 3 log(x)
log(e) | 3
x log(e)3
6 x log(e) + 2
- log(3) - pi I - log(log(e)) - 1/6 ---------------
3
x log(e)
3 **
exp(3 x log(e)) 3 3 |
+ 1/3 ---------------- + log(-3 x log(e)) + Ei(1, -3 xlog(e))|
x log(e) /
/ 3
/ e
/
POLINOMIOS
Ejercicio # 1
%clc, clear
x=5;
g3=((3/8)x^6+3x^3-(1/2)x^4+(6/7)x+8)
pg3=[(3/8)-(1/2) 0 6 (6/5) +8]
G2=polyval(pg3,5)...

Regístrate para leer el documento completo.