mehdi jafari

749 Reputation

13 Badges

11 years, 60 days

MaplePrimes Activity

These are replies submitted by mehdi jafari

@vv what is the relation between left and right eigenvectors? should multiplication of them give the IdentityMatrix? but in maple i cannot achive this? how can i find diagonal form of the matrix using these eigenvectors? thank you for the help.

@mmcdara as u mentioned above, what is the idea for solving my problem? what should i use ?

@mmcdara @Carl Love @acer 

thank you for the responses. there are some points which i explain in the following:
1. @mmcdara when you do not set any method for the optimization, it means that maple itself will search for the proper method according to the help. only when the method is set modifiednewton maple can find an answer and for other methods such as sqp, maple can not find an answer and we got divison by zero error
2. is there any reason that you choosed those ranges for "x"s;(i.e  7..10, 5..10, 1..10). since for other ranges we can not reach an answer except with modifiednewton method.
3. dear @acer , actually we do NOT have any atitude on the integration's value, but on the modified code by @mmcdara the result is 2.204832770*10^6 which is positive. Could you please explain me why those values are wrong and what values for the integration are expected? actually i want to use your inforamtion for deeper understanding of the problem for further problems. 




m:=Vector([ 1 , log(x+b3) , b2/(x+b3) ]):


for i to N do


MM:=( LinearAlgebra:-Trace(MatrixInverse(M)) ):

IF1 := proc(__w1, __w2, __x1, __x2, __x3)
  local J:
  J := evalf(
           eval(MM, [w1=__w1, w2=__w2, x1=__x1, x2=__x2, x3=__x3])
           , [b2=1..2,b3=1..2]
           , method = _d01ajc
           , epsilon=0.001
   #print([_passed], J);
  return J:
end proc:

# check

IF1(0.6, .1, 8, 7, 5);



s:= Optimization:-NLPSolve(
  , 0..1, 0..1, 1..10, 1..10, 1..10
  , initialpoint=[0.6, .1, 8, 7, 5]
  , maximize=false
  , method=modifiednewton

Warning, convergence is not assured; examine Hessian values, or consider raising tolerance


[1077.30026359427006, Vector(5, {(1) = .2390983436806223, (2) = .5071151402152273, (3) = 10.0, (4) = 3.400128412709433, (5) = 1.0})]





thank you for your patience and attention.
sincerely yours.

@acer Actually, we are looking for a design for the model which finds minimum for the Information Matrix. The design points are x1,x2 and x3 and the weights are w1,w2 and 1-(w1+w2).
The information matrix is M. 
According to the Beysian approach, ranges of b1 and b2 are considered. 
we are looking for a global optimum; although in convex optimization problems, a locally optimal solution is also globally optimal.
The ranges for "w"s are necessary, but for "x"s we can consider identical ranges for them.
we thought that the integration is complicated so that we used this method, but if another simple way can be adopted, we gratefully will use that. 
Thanks for your attention and help.

@Miguel_Vega as you mentioned, just supress that line using # in front of the command and just restart the code.

@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

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