The equation is u_t=a(t)u_xx+b(t)u_x+c(t)u+f(x,t) with initial condition and Direichet boundary conditions as follows: u(x,0)=u_0(x) and u(0,t)=u_1(t), u(1,t)=u_2(t).
Eigen-function integral transform would be good to try. The concept is to transform the PDE into an ODE in time only, solve, then transform back to physical space. The advantage (unlike some other methods, like Laplace transform) is that the inverse transform is available a-priori. This method, first used in the 1930s, has been very successful for complicated parabolic equations having a diffusion component. It is discussed in classical texts (like Ozisik's heat conduction book), but I might offer a shameless plug here for a free e-text (see URL below) that does a better job of explaining it to newcomers. From the looks of it, the transform will given you a 2nd-order ODEwith non-constant coeffcients and there are many classical ways to handle that. Best of luck.
Some of the methods other than finite difference are spectral method, FEM(Galerkin's method), spline and B-spline based methods and differential quadrature method. Only issue here is that coefficients here are time dependent which may create stability
problem as time is increases unless they are decaying.
First of all, you can make the boundary conditions homogenous: put v=u-(1-x)u_1(t)-x u_2(t). Then u solves your problem iff v solves the following simpler problem:
v_t=a(t)v_xx+b(t)v_x+c(t)v+g(x,t), v(x,0)=u_0(x)-(1-x)u_1(0)-x u_2(0), v(0,t)=0, v(1,t)=0, where g(x,t)=f(x,t)-(1-x)du_1(t)/dt-x du_2(t)/dt+c(t)((1-x)u_1(t)+x u_2(t))+b(t)(-u_1(t)+ u_2(t)).
You can further simplify things if you put v=exp(s(t))w, where s(t) is an indefinite integral of c(t), i.e., s(t) satisfies ds(t)/dt=c(t) and s(0)=0. Then v satisfies v_t=a(t)v_xx+b(t)v_x+c(t)v+g(x,t) iff w satisfies
w_t=a(t)w_xx+b(t)w_x+h(x,t), where h(x,t)=exp(-s(t))g(x,t).
Next, if you make a change of variable t-->T(t), where T(t) satisfies dT/dt=a(t) and T(0)=0, you can simplify the equation even further:
w_T=w_xx+(b(t(T))/a(t(T)))w_x+h(x,t(T))/a(t(T)).
Finally, let X=x+F(T), where F satisfies dF/dT=(b(t(T))/a(t(T))) and F(0)=0. Then your equation becomes an inhomogeneous heat equation
w_T=w_XX+h(X-F(T),t(T))/a(t(T)).
For the rest look into any good book on equations of mathematical physics (say, Methods of Mathematical Physics by Courant and Hilbert).
Eigen-function integral transform would be good to try. The concept is to transform the PDE into an ODE in time only, solve, then transform back to physical space. The advantage (unlike some other methods, like Laplace transform) is that the inverse transform is available a-priori. This method, first used in the 1930s, has been very successful for complicated parabolic equations having a diffusion component. It is discussed in classical texts (like Ozisik's heat conduction book), but I might offer a shameless plug here for a free e-text (see URL below) that does a better job of explaining it to newcomers. From the looks of it, the transform will given you a 2nd-order ODEwith non-constant coeffcients and there are many classical ways to handle that. Best of luck.
One method is to expand the solution in terms of eigenfunctions of the spatial operator. The eigenvalue equation in this case is u_xx + u_x + u = lamda u, with homogeneous boundary conditions. It is necessary to separate the solution into an asymptotic part and a transient part. The expansion is to be used only for the transient part. Please see the attached file for a specific example.
You can make use of the homotopy perturbation method (see papers of He and many other). The method id easy and efficient. You can also use Trefftz method, however in your case the procedure is a bit complicated, however - in my opinion - better than HPM.
FEM (Finite element method) is highly advisable when you treat it as a propagation problem on one of the coordinates, either time or one of the spatial variables. This method is very efficient when the cross-region contains most of the energy in some spots of the cross-domain. In these cases an adaptive mesh allows to have a dense discretization of the cross-domain, and a coarse discretization where the dependent variable(s) are of low significance.
Finite element method and finite difference methods are equally good. In addition, I would recommend meshless approach as it can be extended to higher dimensions in a very simple way
Thank you Abdulmajeed, I actually use Crank Nicolson scheme to solve this problem, but I think about using some analytical method like Homotopy Purturpation method by liao and so on.
Deepraj I'm not sure if there are problems with it. I used it for a parabolic equation and it worked fine. Sometimes working with PDEs you have to just try things out. They are different beasts that ODEs.
Three methods seem to be very useful in your case:
1) Trefftz method - however then you have to derive the Treffz functions for the equation u_t=a(t)u_xx+b(t)u_x+c(t)u
2) Homotopy perturbation method or homotopy analysis method
3) Method of successive approximation; in this case you can use Trefftz functions for classic heat conduction equation.
How to use the Trefftz method in the first and third case you can find in my papers (you can download them from RG). The second two methods are very well described in literature.
Sounds like Kryzsztof is a real numerical PDE researcher. I've only used methods as needed so I'm an amateur numerical PDE person. I used the method of lines for the Burgers Equation and compared it to the actual solution since you can transform the Burgers Equation to the Heat Equation. No problems there. I do know that often methods are developed for particular PDEs because they exhibit individual difficulties. So its not like ODEs where Runge Kutta works for most and if you have stiff equations you have a second set of methods. Whoever had an issue with method of lines should probably explain-I am also curious.
Using any method combined with the Trefftz method and LSM you will obtain an approximate solution in analytical form, very good for theoretical considerations.
You must try spectral method. If the boundary conditions are periodic then the best option is Fourier spectral, otherwise you can decompose in terms if any orthogonal functions, such as Chebyshev functions.
I haven't seen any consideration of what I would consider a most important aspect: where (physically) the time-variation comes from. In particular: how rapidly are the
coefficients varying and are they doing so in some coordinated way (in which case an analytic change of the time variable may remove the problem)?
Just comments on Method of line, which uses say finite difference method to approximate space derivatives, but not temporal derivative. Hence, the PDE converts to ODE. Use 4-order RK method to solve the governing ODEs.
It have advantage of increasing accuracy in time to 4th order.
When I read your bio, Baghdad University, which I spent 6 years in Engineering college. It remind me for those days, wonderful days with good friends and faculty members.....
I think you can use semi-analytical method by solving the problem in Laplace space then, you will back to the real space (inversion ) using numerical method
Dear Mohammed, as far as I know , since this equation in one dimensional space and it is linear, so with normal initial-boundary conditions, I thinks finite difference methods can give accurate solutions for this equation. especially, unconditional staple methods such as Crank-Niclson or ADI. However, I would say you can try some simple finite elements methods and study the stability of resulted solution, by finding the absolute errors for a test problem. I hope that is help.