Ali Hassani

120 Reputation

4 Badges

10 years, 117 days

MaplePrimes Activity


These are questions asked by Ali Hassani

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

 

Dear all,

I have the following partial differential equation. I want all terms with 'diff' to be moved to the left side of the equation and all source terms to be moved to the right side of the equation.

diff(u(x, t), t, t) + 3 + 2*diff(u(x, t), t) + 4*t + x^2 + x^3/3 + diff(u(x, t), t, x, x) + diff(u(x, t), x, x, x, x) = x*t^2;

Is there a comprehensive solution for such purposes?

The desired result:

diff(u(x, t), t, t) + 2*diff(u(x, t), t) +  diff(u(x, t), t, x, x) + diff(u(x, t), x, x, x, x) = x*t^2-x^3/3 -x^2-4*t -3;

Can anyone guide me?

Best wishes,

Dear All,

I solved the following partial differential equation numerically using pdsolve. As mentioned in the help pages, plotting the solution versus x at a given time is possible. 
Can anyone help me extract the plot of the solution versus time at a given space variable x? Also, how can I extract the data of the mentioned plot, for example, u_numeric (0.75, 0.5)?
pd_numeric:=(D[2,2])(u_numeric)(x,t)+(D[1,1,1,1])(u_numeric)(x,t)-0*h(x,t)=0;
bc_numeric[1]:=u_numeric(0,t)=0;
bc_numeric[2]:=(u_numeric)(1,t)=0; 
bc_numeric[3]:=D[1,1](u_numeric)(0,t)=0;
bc_numeric[4]:=D[1](u_numeric)(1,t)=0; 
ic_numeric[1]:=u_numeric(x,0)=0.1*x*(x-1)^2;
ic_numeric[2]:=D[2](u_numeric)(x,0)=0;

sol:=pdsolve(pd_numeric, {seq(bc_numeric[i], i=1..4), seq(ic_numeric[i],i=1..2)}, u_numeric(x,t), time=t, range=0..1, numeric, spacestep=1/2000, timestep=1/2000);
sol:-plot(t=1);
sol:-animate(t=1, frames=2000, title="time=%f");
Best wishes

Dear All,

I want to define a linear transformation called T, an operator on the variable x. This transformation is such that, for example, the transformation T(alpha__1*x^2*y+alpha__2*x^4*t+alpha__3*t*y) returns alpha__1*y*T(x^2)+alpha__2*t*T(x^4)+alpha__3*t*y*T(1).

Can anyone help me in this matter? At this stage of the work, I don't have a precise definition of this linear transformation.

T(alpha__1*x^2*y+alpha__2*x^4*t+alpha__3*t*y)=alpha__1*y*T(x^2)+alpha__2*t*T(x^4)+alpha__3*t*y*T(1);

Best wishes

Dear All,
Does Maple have built-in Finite Fourier Sine/Cosine Transformation which is defined as below?
2/L*int(f(x)*sin(n*Pi/L*x),x=0..L);

How can I get the finite Fourier transform for the derivatives of a function in terms of its own Fourier transform? 

I know that the fouriersin/fouriercos commands of the inttrans package have the Fourier sine/cosine transformation for the interval from x=0 to infinity?

Best wishes

1 2 3 4 5 Page 2 of 5