Question: Using numerically obtained functions in formulation of initial value problems

Hi I am trying to combine a previous, numerically obtained result in a subsequent calculation: outline: suppose i have a given function, f(x), and i wish to construct the following boundary value problem: y''(x)=f(x), y(0)=1, y(1)=2 the known function f(x) is a result of another calculation, which i have obtained numerically. (f(x)=proc(x)...end proc, or something to that affect). code: -------------------------------------------- > restart; > sys := {diff(y(x), x) = x, y(0) = 1}; / d \ { --- y(x) = x, y(0) = 1 } \ dx / > sol0 := dsolve(sys, numeric, output = listprocedure); [x = proc(x) ... end;, y(x) = proc(x) ... end;] > s := subs(sol0, y(x)); proc(x) ... end; > #test, s is what i called f(x) earlier > s(1); 1.50000000000000000 >#new IVP here > > sys2 := {diff(U(x), x) = s, U(0) = 1}; #(*) / d \ { --- U(x) = s, U(0) = 1 } \ dx / > sol1 := dsolve(sys2, numeric, output = listprocedure); [x = proc(x) ... end;, U(x) = proc(x) ... end;] > s2 := subs(sol1, U(x)); s2:=proc(x) ... end; > s2(1); Error, (in s2) global 's' must be assigned to a numeric value before obtaining a solution > -------------------------------------- I have also tried substituting "s" in (*) for "s(x)" and "eval(y(x),sol0)", all to no avail. Is it possible to do such calculations in Maple? thanks
Please Wait...