J4James

355 Reputation

12 Badges

12 years, 112 days

MaplePrimes Activity


These are replies submitted by J4James

@Markiyan Hirnyk 

I didn't got you at first. 

@Markiyan Hirnyk 

Sorry for the issue with the header. I am using Maple 18.

 

Could you please post your ode?  Otherwise, It's a guessing game. 

@Rouben Rostamian  

What's the main purpose of seq in the contour command here?

@tejolson I totally miss understood the question.

Same type of question has been answered here using FDM.

Could you please show us your try?

You need to specify the missing 8 ics and value for N.

@Carl Love 

You are right. I is equal to sqrt(-1). And I need to know whhether, Maple can simplify this expression or not. 

"S" is the end point of y ( y is [0, S]), being just another numerical constant. 

For example, We take S = 0.5 then f0(S=0.5)=1 having f0(0)=0.

Hope this make sense.  

P.S. we need ''S'' to be symbolica as mentioned by @Preben Alsholm answering this question.

Thank You @Axel Vogt and @Preben Alsholm

@tomleslie 

Thanks dear. It worked the way I wanted.

@Axel Vogt 

I already uploaded the complete sheet, where I'm tring to solve the diffusion equation. 

 

restart;

with(PDEtools):with(plots):

with(linalg):with(inttrans):

 

eq:=diff(u(x,t),t)=phi*diff(u(x,t),x$2);

diff(u(x, t), t) = phi*(diff(diff(u(x, t), x), x))

(1)

u(x,0):=0;

0

(2)

bc1:=u(0,t)=sin(t);

u(0, t) = sin(t)

(3)

bc2:=u(infinity,t)=0;

u(infinity, t) = 0

(4)

eqs:=laplace(eq,t,s);

s*laplace(u(x, t), t, s) = phi*(diff(diff(laplace(u(x, t), t, s), x), x))

(5)

eqs:=subs(laplace(u(x,t),t,s)=U(x),eqs);

s*U(x) = phi*(diff(diff(U(x), x), x))

(6)

bc1:=laplace(bc1,t,s);

laplace(u(0, t), t, s) = 1/(s^2+1)

(7)

bc1:=subs(laplace(u(0,t),t,s)=U(0),bc1);

U(0) = 1/(s^2+1)

(8)

U(x):=rhs(dsolve({eqs,bc1},U(x)));

-(_C2*s^2+_C2-1)*exp(s^(1/2)*x/phi^(1/2))/(s^2+1)+_C2*exp(-s^(1/2)*x/phi^(1/2))

(9)

eqc:=coeff(U(x),exp(sqrt(s)*x/sqrt(phi)));

-(_C2*s^2+_C2-1)/(s^2+1)

(10)

_C2:=solve(eqc,_C2);

1/(s^2+1)

(11)

U(x):=eval(U(x));

-(s^2/(s^2+1)+1/(s^2+1)-1)*exp(s^(1/2)*x/phi^(1/2))/(s^2+1)+exp(-s^(1/2)*x/phi^(1/2))/(s^2+1)

(12)

u:=invlaplace(U(x),s,t);

invlaplace(exp(-s^(1/2)*x/phi^(1/2))/(s^2+1), s, t)

(13)

 U(x):=subs(x=x1,phi=phi1,U(x));

-(s^2/(s^2+1)+1/(s^2+1)-1)*exp(s^(1/2)*x1/phi1^(1/2))/(s^2+1)+exp(-s^(1/2)*x1/phi1^(1/2))/(s^2+1)

(14)

assume(x1>0,phi1>0);

 u:=invlaplace(U(x),s,t);

(1/2)*x1*(int(exp(-(1/4)*x1^2/(phi1*_U1))*sin(t-_U1)/_U1^(3/2), _U1 = 0 .. t))/(Pi*phi1)^(1/2)

(15)

u:=subs(x1=x,phi1=phi,u);

(1/2)*x*(int(exp(-(1/4)*x^2/(phi*_U1))*sin(t-_U1)/_U1^(3/2), _U1 = 0 .. t))/(Pi*phi)^(1/2)

(16)

 

 

Download ss.mwss.mw

Thanks

As was pointed out by @tomleslie, I used the simplified version and tried to find the invlapalce using both Maple and Mathemaica. 

Maple is able to give numerical results but no analytical expression. 

u := invlaplace(exp(-sqrt(s)*x/sqrt(phi))/(s^2+1), s, t);

plot([subs(phi=1,t=Pi,u)],x=0..10,axes=boxed);

Mathematica gives me an analytical expression 

g[s_] = Exp[-Sqrt[s] x/Sqrt[1]]/(s^2 + 1)

a = InverseLaplaceTransform[g[s], s, t] // Simplify[#, x > 0] &

t = 3*Pi/2;

Plot[a, {x, 0, 15}]

 

 

@Preben Alsholm @tomleslie@Markiyan Hirnyk

Thanks all for your valuable comments. Here is the backgroud of the function U(x).

ss.mw

Hand calculations gives me (tau=t)

 

 

 

2 3 4 5 6 7 8 Last Page 4 of 21