J4James

335 Reputation

12 Badges

9 years, 68 days

MaplePrimes Activity


These are replies submitted by J4James

@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)

 

 

 

@Preben Alsholm When I apply to a more complicated one then I get an error

Eq1:=(diff(P1(X, Y), Y, Y))*exp(2*epsilon*alpha[2]-epsilon*alpha[3])+(diff(T(X, Y), X))*exp(epsilon*alpha[1]-epsilon*alpha[4])-(diff(P(X, Y), X))*exp(epsilon*alpha[1]-epsilon*alpha[5]);

indets(Eq1,specfunc(anything,exp));
ln~(%) assuming real;
`=`(op(%));
simplify(%/epsilon);

Error, invalid input: `=` expects 2 arguments, but received 3

 

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