Question: How can I extract an unknown function by its taylor series?

I want to get the unknown function whose Taylor expansion I have. For example, giving x - 1/6*x^3 + 1/120*x^5 - 1/5040*x^7 + 1/362880*x^9 will return sin(x). The following algorithm can be implemented for this simple function:

with(inttrans):

with(numapprox):

convert(taylor(sin(x),x, 10),polynom);

laplace(%, x, s1);

eval(%, s1=1/s2);

pade(%, s2, [3,3]);

eval(%, s2=1/s1);

invlaplace(%, s1, x);

But this approach does not lead to the correct solution for slightly more complex functions. For example, if I have the Taylor expansion of the function sin(x^2), I cannot reach the function sin(x^2) with the above algorithm. Note that before extracting the sin(x^2) function, this function is unknown to us and we only have its Taylor expansion:

with(inttrans):

with(numapprox):

convert(taylor(sin(x^2),x, 15),polynom);

laplace(%, x, s1);

eval(%, s1=1/s2);

pade(%, s2, [3,3]);

eval(%, s2=1/s1);

invlaplace(%, s1, x);

Also, the Taylor expansion of the simple function exp(-x^2) with the above algorithm is returned as a trigonometric function:

with(inttrans):

with(numapprox):

convert(taylor(exp(-x^2),x, 10),polynom);

laplace(%, x, s1);

eval(%, s1=1/s2);

pade(%, s2, [3,3]);

eval(%, s2=1/s1);

invlaplace(%, s1, x);

The importance of solving this problem becomes clear when we want to solve the differential equation or the set of differential equations by applying the ‘series’ option. If the variable t expresses time, it can never be obtained with a polynomial function u(t) in sufficiently large times. For example, the exact solution of the following differential equation is u(t)=exp(-a*t^2):

Order:=12;

ode:=t*diff(u(t),t,t)+8*diff(u(t),t)+18*a*t*u(t)=-4*a*t*u(t)*ln(u(t));

ic1:=u(0)=1;

ic2:=D(u)(0)=0;

dsolve({ode, ic1,ic2}, u(t), series);

Does anyone have an idea to extract the unknown function from its taylor expansion?

Best wishes

Please Wait...