Interpolatingfunction : Borra Resolvedor Diferencial Numérico
Interpolatingfunction : Borra Resolvedor Diferencial Numérico
Interpolatingfunction : Borra Resolvedor Diferencial Numérico
In[12]:= sol = NDSolve[y '[x] ⩵ 3 x - 2 y[x] && y[0] ⩵ 1, y[x], {x, 0, 5}][[1, 1, 2]]
resolvedor diferencial numérico
4
Out[13]=
3
1 2 3 4 5
15.875
In[39]:= sol[x_] := NDSolve[y '[t] ⩵ 3 t - 2 y[t] && y[0] ⩵ 1, y[t], {t, 0, 7}][[1, 1, 2]] //. t → x;
resolvedor diferencial numérico
sol[2.5]
sol '[2.5]
NIntegrate[sol[x], {x, 0, 5}]
integra numéricamente
Out[40]= 3.01179
Out[41]= 1.47642
Out[42]= 15.875
4
Out[44]=
3
1 2 3 4 5
Out[45]= {{0., 1.}, {0.5, 0.643789}, {1., 0.986837}, {1.5, 1.58713}, {2., 2.28205}, {2.5, 3.01179},
{3., 3.75434}, {3.5, 4.5016}, {4., 5.25059}, {4.5, 6.00022}, {5., 6.75008}}
Out[46]//TableForm=
x y[x]
0. 1.
0.5 0.643789
1. 0.986837
1.5 1.58713
2. 2.28205
2.5 3.01179
3. 3.75434
3.5 4.5016
4. 5.25059
4.5 6.00022
5. 6.75008
Out[78]=
1 2 3 4 5
4
Out[81]= {0., 0.}, 0.5, 8.7844 × 10-8 , 1., 1.71113 × 10-7 , 1.5, 3.52172 × 10-9 ,
2., 9.04689 × 10-8 , 2.5, 3.18353 × 10-8 , 3., 2.4643 × 10-8 , 3.5, 1.28291 × 10-8 ,
4., 7.00039 × 10-9 , 4.5, 1.02249 × 10-8 , 5., 1.46047 × 10-9
Out[82]//TableForm=
x y(x) - approx(x)
0. 0.
0.5 8.7844 × 10-8
1. 1.71113 × 10-7
1.5 3.52172 × 10-9
2. 9.04689 × 10-8
2.5 3.18353 × 10-8
3. 2.4643 × 10-8
3.5 1.28291 × 10-8
4. 7.00039 × 10-9
4.5 1.02249 × 10-8
5. 1.46047 × 10-9