Different results with ReplaceAll and direct substitution
- To: mathgroup at smc.vnet.net
- Subject: [mg108936] Different results with ReplaceAll and direct substitution
- From: Alessio Giberti <giberti at fe.infn.it>
- Date: Wed, 7 Apr 2010 07:26:14 -0400 (EDT)
Hi all. A vector function of one variable, defined as follows,
Y=expA[z].(Y0+Integrate[expA[-s].b[s],{s,0,z}])
give me different results if I use ReplaceAll instead of writing
directly the value of z:
Y /. z -> 0
Out[41]=
{0.207031, 0.408203, 0.50293, 0.40625, 0.206543, 0., -0.00195313,
0.00195313, 0., 0.}
expA[0].(Y0 + Integrate[expA[-s].b[s], {s, 0, 0}])
Out[42]=
{0.206431, 0.408134, 0.503139, 0.405617, 0.206019, 0., 0., 0., 0., 0.}
Where expA[z] is a matrix (10x10 in this case), Y0 is a vector of
constants and b is a vector of functions. Since the last 5 components of
Y0 are all zero, the first result cannot be correct!
Why these 2 different results?