Question: Why are different answers produced?

PrimesQuestion.mw

Please let me know if this link correctly accesses my worksheet. If not, I will copy its contents into this question.

Which ODE in the worksheet, if any, provides the correct answer?


restart

f := proc (x) local t; if not type(evalf(x), 'numeric') then ('procname')(x) else evalf(Int(exp(-(1/10)*t^2), t = 0 .. x)) end if end proc

solA := dsolve({diff(y(x), x) = y(x)+f(x), y(0) = 0}, numeric, known = f)

solA(1)

[x = 1., y(x) = HFloat(0.7081492947996167)]

(1)

f2 := evalf(Int(exp(-(1/10)*t^2), t = 0 .. 1)); f(1)

.9676433126

 

.9676433126

(2)

solB := dsolve({diff(y(x), x) = y(x)+f2, y(0) = 0}, numeric, output = listprocedure)

solB(1)

[x(1) = 1., (y(x))(1) = HFloat(1.6626837619970016)]

(3)

YinSolB := subs(solB, y(x))

YinSolBeval := solve(YinSolB(a) = .7081, a); solB(YinSolBeval)

.5491485953

 

[x(.5491485953) = .5491485953, (y(x))(.5491485953) = HFloat(0.7081000000284681)]

(4)

NULL


 

Please Wait...