labo1 ecuas dif
DESCRIPTION
laboratorio de ecuaciones diferencialesTRANSCRIPT
Inicio:
>> 2+5
ans =
7
>> 2+5;
>> a=2+5
a =
7
>> b= a^2;
>> b
b =
49
>>
1.-
y=dsolve('Dy = t-y');
>> y
y =
t + C3*exp(-t) - 1
>> y=simplify(y)
y =
t + C3*exp(-t) - 1
>> pretty (y)
t + C3 exp(-t) - 1
>>
>>
>> y=dsolve('Dy = t-y', 'y(1)= 2');
>> y
y =
t + 2*exp(-t)*exp(1) - 1
>> ezplot(y, [0,5])
>> y=dsolve('Dy = t-y');
y
y =
t + C3*exp(-t) - 1
y=simplify(y)
y =
t + C3*exp(-t) - 1
pretty (y)
t + C3 exp(-t) - 1
y=dsolve('Dy = t-y', 'y(1)= 2');
y
y =
t + 2*exp(-t)*exp(1) - 1
ezplot(y, [0,5])
2. Espejo parabólico.
>> ezplot(y,[-5,5]);
>> ezplot(y,[-5,5])
>> y= dsolve('Dy=((y-2)+ sqrt((y-2)^2+t^2))/t','y(0)=1');
>> y
y =
t^2/4 + 1
>> ezplot(y,[-5,5])
3.Cambio de variable independiente.
>> y= dsolve('Dy=((y-2)+ sqrt((y-2)^2+x^2))/x','y(0)=1','x');
>> y
y =
x^2/4 + 1
4* cambio variable independinte.
>> y=dsolve('Dy = x-y', 'y(1)= 2', 'x');
>> y
y =
x + 2*exp(-x)*exp(1) - 1
ejmeplo4
>> y=dsolve('Dy +(y/x) = (exp(x))/x', 'y(1)=2','x');
>> y
y =
exp(x)/x - (exp(1) - 2)/x
>> y=simplify(y)
y =
(exp(x) - exp(1) + 2)/x
>> pretty(y)
exp(x) - E + 2
--------------
x