Boundary Value Problem and FullSimplify

I'm confused about the output Mathematica is giving me when solving a boundary value problem of the form:

eq = ϵ y''[t] + 2 y'[t] + 2 y[t] == 0;
bc1 = y == 0;
bc2 = y == 1;

aSol = y[t] /. DSolve[{eq, bc1, bc2}, y[t], t][][]


This yields the correct answer, and produces plots like this for ep=1, ep=0.1, and ep=0.01.

Plot[{
aSol /. ϵ -> 1,
aSol /. ϵ -> 0.1,
aSol /. ϵ -> 0.01},
{t, 0, 1}, Frame -> True, FrameLabel -> {"t", "y(t)"}]


So far, so good!

However, if I simply ask Mathematica to FullSimplify[aSol], the resulting solution is no longer correct, and it does not satisfy one of the boundary conditions:

aSolSimpl = FullSimplify[aSol]

Plot[{
aSol /. ϵ -> 0.05,
aSolSimpl /. ϵ -> 0.05
}, {t, 0, 1}, Frame -> True, FrameLabel -> {"t", "y(t)"}] What's going wrong here?

• i think because you assign Epsilon different values. i used Full Simplify and it was fine with me use it as follow to check aSol = y[t] /. DSolve[{eq, bc1, bc2}, y[t], t] /. [Epsilon] -> 1 aSolSimpl = FullSimplify[aSol] /. [Epsilon] -> 1 Plot[{aSol}, {t, 0, 1}, Frame -> True, FrameLabel -> {"t", "y(t)"}] Plot[{aSolSimpl}, {t, 0, 1}, Frame -> True, FrameLabel -> {"t", "y(t)"}] – Alrubaie Mar 21 at 15:19
• @dpholmes Plotting Plot3D[Evaluate[{aSol, FullSimplify[aSol, \[Epsilon] > 0]}], {t, 0, 1}, {\[Epsilon], 0, 1}] reveals that it might be a precision problem. – Henrik Schumacher Mar 21 at 15:20

This behavior seems due to precision problems, as Henrik suggested in comments:

aSol = DSolveValue[{eq, bc1, bc2}, y[t], t];
aSolSimpl = FullSimplify[aSol];

Plot[Evaluate[aSol /. ϵ -> {1, 1/10, 1/100}], {t, 0, 1}]

Plot[
Evaluate[aSolSimpl /. ϵ -> {1, 1/10, 1/100}], {t, 0, 1},
WorkingPrecision -> \$MachinePrecision
] 