Mariusz Iwaniuk

1571 Reputation

14 Badges

9 years, 300 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by Mariusz Iwaniuk

What do you mean by Laplace ?

@Ridz 

 

If I answered correctly to yours question please give me thumbs-up (upvote) ? 

Answer you can find in the book: 

Nonlinear Physics with Maple for Scientists and Engineers Richard H. EnnsGeorge McGuire 2001 year on page 182.

Book you can find: https://books.google.com.

You want to solve PDE or ODE? Decide?

conjugate(x) = abs(x)^2/x

 

@Preben Alsholm 

Thanks for info.Yes I'm also got lost.

 

Regards,MI

 

@9009134

I used the talbot method or another methods for numerically inverse laplace transform but i gain different result.!!!

 

And I do not know why this is happening !

Strange, mysterious things happen. 

FracPDE_vers_3.mw

 

@Preben Alsholm 

Yes I made a mistake.Thanks.

 

@9009134 

I don't know why Talbot method fail in yours case.I not a expert. Another  numeric Inverse Laplace method you can find here:https://www.google.com

@9009134 

It's all correct,but in your case for which the Talbot method fails. Only for short time we obtain a good approximation.

@9009134 

I have Maple 2018 on Windows 8.1 64 bit.

 

I don't remember refrence I only know a method:STEHFEST

Only found:

http://www.esd.mun.ca/~farq/PDFs/JianhuiLi_SEG_2015.pdf

http://www.math.yorku.ca/~akuznets/Gaver_Stehfest.pdf

AN IMPROVED TALBOT METHOD FOR NUMERICAL LAPLACE TRANSFORM INVERSION

from here:

https://arxiv.org/pdf/1304.2505.pdf

@Math Pi Euler 


 

We obtain a series expansion in terms of a small parameter, of the solution of a second

order nonlinear differential equation.

restart;

de := diff(z(x),x,x) + z(x) - cos(2*x)/(1+delta*z(x)) = 0;

diff(diff(z(x), x), x)+z(x)-cos(2*x)/(1+delta*z(x)) = 0

(1)

 bc := z(-Pi/4)=0, z(Pi/4)=0

z(-(1/4)*Pi) = 0, z((1/4)*Pi) = 0

(2)

We are going to expand the solution of this boundary value problem in powers of delta,

and pick the leading N terms like this:

N := 3;  # change as needed
S := z(x) = add(u[n](x)*delta^n, n=0..N-1);

3

 

z(x) = u[0](x)+u[1](x)*delta+u[2](x)*delta^2

(3)

Substitute the series expression S in the differential equation and simplify:

eval(de, S):
series(lhs(%), delta, N):
collect(%, delata, simplify):
tmp := convert(%, polynom);

diff(diff(u[0](x), x), x)+u[0](x)-cos(2*x)+(diff(diff(u[1](x), x), x)+u[1](x)+cos(2*x)*u[0](x))*delta+(diff(diff(u[2](x), x), x)+(-u[0](x)^2+u[1](x))*cos(2*x)+u[2](x))*delta^2

(4)

This is supposed to hold for all delta, therefore the coefficient of each power of delta is zero.
This gives us a system of N coupled differential equations in N unknowns:

DEs := coeffs(tmp, delta);

diff(diff(u[0](x), x), x)+u[0](x)-cos(2*x), diff(diff(u[2](x), x), x)+(-u[0](x)^2+u[1](x))*cos(2*x)+u[2](x), diff(diff(u[1](x), x), x)+u[1](x)+cos(2*x)*u[0](x)

(5)

Apply the given boundary conditions to generate boundary conditions for the new unknowns:

BCs := seq(subs(z=u[n], [bc])[], n=0..N-1);

u[0](-(1/4)*Pi) = 0, u[0]((1/4)*Pi) = 0, u[1](-(1/4)*Pi) = 0, u[1]((1/4)*Pi) = 0, u[2](-(1/4)*Pi) = 0, u[2]((1/4)*Pi) = 0

(6)

sol := simplify(value(dsolve({DEs},`build`)));

{u[0](x) = sin(x)*_C6+cos(x)*_C5-(2/3)*cos(x)^2+1/3, u[1](x) = -(4/45)*cos(x)^4+(1/4)*_C5*cos(x)^3+(1/720)*(180*sin(x)*_C6+64)*cos(x)^2+(1/720)*(-180*_C6*x+720*_C3-225*_C5)*cos(x)+7/45+(1/720)*(-180*_C5*x+720*_C4+45*_C6)*sin(x), u[2](x) = -(16/525)*cos(x)^6+(19/144)*_C5*cos(x)^5+(1/302400)*(-40320*_C5^2+40320*_C6^2+39900*sin(x)*_C6+13824)*cos(x)^4+(1/302400)*(-80640*_C5*_C6*sin(x)-18900*_C6*x+75600*_C3-48300*_C5)*cos(x)^3+(1/302400)*((-18900*_C5*x+75600*_C4-31500*_C6)*sin(x)-60480*_C5^2-141120*_C6^2+10496)*cos(x)^2+(1/302400)*(40320*_C5*_C6*sin(x)+(9450*x^2-16275)*_C5-75600*_C4*x+69300*_C6*x+302400*_C1-94500*_C3)*cos(x)+(1/302400)*(-50400*_C5*x+(9450*x^2-24675)*_C6-75600*_C3*x+302400*_C2+18900*_C4)*sin(x)+(2/5)*_C5^2-(1/15)*_C6^2-118/4725}

(7)

Apply the given boundary conditions.Now build the final solution:

sol2 := solve([eval(rhs(sol[1]), x = -(1/4)*Pi) = 0, eval(rhs(sol[1]), x = (1/4)*Pi) = 0, eval(rhs(sol[2]), x = -(1/4)*Pi) = 0, eval(rhs(sol[2]), x = (1/4)*Pi) = 0, eval(rhs(sol[3]), x = -(1/4)*Pi) = 0, eval(rhs(sol[3]), x = (1/4)*Pi) = 0], {_C1, _C2, _C3, _C4, _C5, _C6})

{_C1 = -(1/90)*2^(1/2)*Pi-(1/30)*2^(1/2), _C2 = 0, _C3 = -(8/45)*2^(1/2), _C4 = 0, _C5 = 0, _C6 = 0}

(8)

sol3:=eval(S, eval(sol, sol2)):
sol4:=sort(sol3, delta, ascending);

z(x) = 1/3-(2/3)*cos(x)^2+(-(4/45)*cos(x)^4+7/45+(4/45)*cos(x)^2-(8/45)*2^(1/2)*cos(x))*delta+(-(16/525)*cos(x)^6-118/4725+(8/175)*cos(x)^4-(2/45)*2^(1/2)*cos(x)^3+(164/4725)*cos(x)^2+(1/302400)*(-3360*2^(1/2)*Pi+6720*2^(1/2))*cos(x)+(2/45)*2^(1/2)*x*sin(x))*delta^2

(9)

sol5 := combine(rhs(sol4))

-(1/3)*cos(2*x)-(8/45)*2^(1/2)*cos(x)*delta-(1/90)*cos(4*x)*delta+(1/6)*delta-(1/90)*cos(x)*2^(1/2)*Pi*delta^2+(2/45)*2^(1/2)*x*sin(x)*delta^2-(1/90)*2^(1/2)*cos(x)*delta^2-(1/90)*2^(1/2)*cos(3*x)*delta^2-(1/1050)*cos(6*x)*delta^2+(7/270)*cos(2*x)*delta^2

(10)

z(x) = sort(collect(sol5, delta), delta, ascending)

z(x) = -(1/3)*cos(2*x)+(-(1/90)*cos(4*x)+1/6-(8/45)*2^(1/2)*cos(x))*delta+(-(1/1050)*cos(6*x)+(7/270)*cos(2*x)-(1/90)*2^(1/2)*cos(x)-(1/90)*2^(1/2)*cos(3*x)-(1/90)*cos(x)*2^(1/2)*Pi+(2/45)*2^(1/2)*x*sin(x))*delta^2

(11)

``

Remark: There is no impediment, in principle, to calculating higher order terms by increasing N.

Trying N = 3, however, reveals a Maple bug.  The solution fails at the dsolve() step.  We may

solve the system manually without much difficulty, because the coupling of the system's equations

is in triangular form and the solution may be achieved by solving the equations in sequence, a single

equation at a time.


 

Download dsolve-perturbation_solution_ver2.mw

 

@Rouben Rostamian  

pde := diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = 0;
ic := u(x, 0) = piecewise(x <= 0, 0, 1);
sol := `assuming`([pdsolve([pde, ic], HINT = f(x)/f(t))], [t > 0, x > 0])

Maple give:

# sol := u(x, t) = 1

 

First 20 21 22 23 24 25 26 Last Page 22 of 30