mehdi jafari

679 Reputation

13 Badges

9 years, 118 days

MaplePrimes Activity

These are replies submitted by mehdi jafari

@tomleslie actually you are right, but the problem is the same pde with replacing z^2 with z, can be solved with these boundary/initial conditions. thus the analytical solution can be found, but maple can not do it for this problem.
thank you for your answer.



pde__1 := diff(z(x, t), `$`(t, 2))-(diff(z(x, t), `$`(x, 2)))+z(x, t)^2 = 6*x*t*(-t^2+x^2)+x^6*t^6

diff(diff(z(x, t), t), t)-(diff(diff(z(x, t), x), x))+z(x, t)^2 = 6*x*t*(-t^2+x^2)+x^6*t^6


conds__1 := z(x, 0) = 0, z(0, t) = 0, z(1, t) = t^3

pdsolve([pde__1, conds__1])

pde__2 := diff(z(x, t), `$`(t, 2))-(diff(z(x, t), `$`(x, 2)))+z(x, t) = 6*x*t*(-t^2+x^2)+x^6*t^6

diff(diff(z(x, t), t), t)-(diff(diff(z(x, t), x), x))+z(x, t) = 6*x*t*(-t^2+x^2)+x^6*t^6


conds__2 := z(x, 0) = 0, z(0, t) = 0, z(1, t) = t^3

pdsolve([pde__2, conds__2], z(x, t))

z(x, t) = -(Sum(12*sin(n*Pi*x)*((1/12)*n^4*(Pi^2*n^2+1)*Pi^4*((-12*Pi^2*n^2+72)*(-1)^n*(Pi^2*n^2+1)^(1/2)+_C1[n]*n^3*Pi^3*(Pi^2*n^2+1)^2)*cos((Pi^2*n^2+1)^(1/2)*t)+(-86400+(-120*Pi^6*n^6+3600*Pi^4*n^4-43200*Pi^2*n^2+86400)*(-1)^n)*sin((Pi^2*n^2+1)^(1/2)*t)+(((Pi^6*n^6-30*Pi^4*n^4+360*Pi^2*n^2-720)*(Pi^2*n^2+1)^2*t^5+(-20*Pi^8*n^8+580*Pi^6*n^6-6600*Pi^4*n^4+7200*Pi^2*n^2+14400)*t^3-(7/2)*Pi^6*n^6*(Pi^2*n^2+1)^2*t^2+(120*Pi^6*n^6-3600*Pi^4*n^4+43200*Pi^2*n^2-86400)*t+n^8*Pi^8-5*Pi^6*n^6-6*Pi^4*n^4)*(-1)^n+720*(120+(Pi^2*n^2+1)^2*t^4+(-20*Pi^2*n^2-20)*t^2)*t)*(Pi^2*n^2+1)^(1/2)-(1/12)*_C1[n]*n^7*Pi^7*(Pi^2*n^2+1)^3)/((Pi^2*n^2+1)^(7/2)*n^7*Pi^7), n = 1 .. infinity))+t^3*x




Download pde_(2).mw

@tomleslie thank you for your explanation. i think i have made a mistake, tnx alot.

@Carl Love thank you for your answer, but therr is a problem. 

The polynomials are correct  but betas are not correct and are different from the betas in equations above. 

Are the betas in this procedure identical with the ones in the equation?


@Carl Love is seq[reduce= `+`] equivalent to `+`(seq) ? it seems the latter is more efficient. Am i wrong?
on my question on page, i reffered here. but i couldn't find out how to code nested loops. are nested loops explaind here?

Iterator:-CartesianProduct([1,1]): #Force compilation

P:= 2..4: #suffixes of m and c variables
N:= [$0..4]: #evaluation values of m variables

B:= subs(
    {_C= [$P], _V= [c||P]},
    local r:= add(M*~_C), s:= 1+r, t:= s-add(M);
    end proc
    seq[reduce= `+`](B(v), v= Iterator:-CartesianProduct(N$(rhs(P)-1)))

memory used=0.69MiB, alloc change=0 bytes, cpu time=16.00ms, real time=14.00ms, gc time=0ns


Iterator:-CartesianProduct([1,1]): #Force compilation

P:= 2..4: #suffixes of m and c variables
N:= [$0..4]: #evaluation values of m variables

B:= subs(
    {_C= [$P], _V= [c||P]},
    local r:= add(M*~_C), s:= 1+r, t:= s-add(M);
    end proc
    `+`(seq(B(v), v= Iterator:-CartesianProduct(N$(rhs(P)-1))))

memory used=395.63KiB, alloc change=0 bytes, cpu time=0ns, real time=7.00ms, gc time=0ns




@Carl Love yes as you said,  t[j] and t[i] are symbolic variables independent of t .the definiton of t[j] is as follows:

which if not of importance to use it here. i just want to know whether these summations and product can be coded?
tnx for the help

@mmcdara thank you for you comprehensive explanations. interesting code it was.

@tomleslie tnx for your attention. 

Actually i want equation one in terms of other functions and variables and differential opertors so that equation 1 doesn't contain the function psi(x,t).

Actually if i could write equation 2 in terms differential operators and then factor psi(x,t) (sth like isolating psi(x,t) in terms of other functions), i could replace it in equation 1 so that equation 1 does NOT contain any psi(x,t).

is it clear now?

can it be done by factoring differential operators and NOT directly using dsolve?

@acer Thank you for clarifying explanations, actually we want to compare the results both qualitatively and quantitatively with the results of an article. But when mu=0 or mu=1 , there is an unwanted pick in the plot a shown blow:

For mu=8, qualitative asnwer is correct.

Here is the article:


@mmcdara tnx for comprehensive explanations, but in my laptop in takes about several mintues(5-10) to get it solved.
mybale you use super computer or mine is very old and deprecated. anyways thank you. do you think solving it with more digits would change the results or not ? 

@Preben Alsholm thank you for the solution provided, but it takes alot for maple to find a solution. isn't it any faster solution? espsecially for the case mu=0

@mmcdara here is the corrected code


Finger crossed! 
This code is amazing,I appreciate your efforts for solving this equation.
I have some offers to improve the code.
1- could you please put a “ minus “ within this prentice:
Is located in the following term:

G := cos(delta/Omega*(sin(Omega*t)-sin(Omega*(t-tau)))+w[0]*tau)*2*k[b]*T*w[c]^2
     (w[c]*exp(-w[c]*tau)/(w[c]^2) + 2*Sum((w[c]*exp(-w[c]*tau)-nu*n*exp(nu*n*tau))/(w[c]^2-(nu*n)^2),n=1..5));

2- About the approximation, yes this is perfect.

3- This kind of differential integral equation in physics is about population of excited state in an atom, so it should be positive always, and it should fluctuate between 0.5 and 0, then I am thinking why this is negative and bigger than 0.5? What do you think?

@mmcdara When i run the your code, i got some errors in the code, is the code ok for you? If it is ok, then i explain the problem more.

As you're saying, this kind of differential integral equations are very complicated and i appreciate your efforts for solving this. I have some suggestions and explanations to improve this code,i hope we altogether with the help of you and other experts. could solve the problem.

1-# for n > 0 the denominator of op S is equivalent to -3.947841762*10^5*n^2 = (628.3185308*abs(n))^2 and the
# numerator is equivalent to 628.3185308*abs(n)*exp(-628.3185308*abs(n)*tau):
# Thus, assuming n > 0:) but in this work for getting the following equation

for calculating k1, we used a Taylor expansion which it has a sum on n=-infinity..infinity, and term of (nu[n]) is a frequency so it should be positive so we considered abs in k1 formula,  so I think we should consider n<0 as n>=0 ( n=-infinity..infinity, ). what do you think? how we can extend this code to consider entire domain?

2- the other approximation is considered in

sum((0.1000000000e-1*exp(-0.1000000000e-1*tau)-628.3185308*abs(n)*exp(-628.3185308*abs(n)*tau))/(-394784.1762*n^2+0.1000000000e-3), n = -infinity .. infinity)

 I think so, it is true only for very small amounts in comparison the others, what do you think?is it general?

3-in equation (7)
RHS := eval(-G*rho(tau)+1/2(G-F), rho(tau)=U);
could you please put a * between 1/2 and (G-F)? and i think it can affect the output.

4-the initial value of rho=0.5;

5-the maximum value of t you want to solve to:
almost after 200 (or more)  it  'maybe'  be constant, for example for T=100 the final constant is 0.4975 (steady state).

thank you for the time you spend on this,
Sincerely yours

@mmcdara thank you, i think i should use numerical solution. tnx

@Carl Love can we remove  " t "  from expression between y and x? i mean can we find an explicit expression between y and x with removing the variable t ?

1 2 3 4 5 6 7 Last Page 1 of 22