Mikael Hakman

15 Reputation

2 Badges

6 years, 119 days

MaplePrimes Activity

These are replies submitted by Mikael Hakman

I'm sorry for the format but this is what mapleprimes editor gives for an maple *.mw file. I'm attaching also a link to the file.



Original PDE system:


pdesys := {diff(C(x, t), t) = phi*epsilon*J(x, t)*C(x, t), diff(J(x, t), x) = epsilon*J(x, t)*C(x, t)}:


C(x,t) is concentration of a reactant, J(x,t) is light intensity, epsilon is absorption coefficient, phi is quatum yield, x is distance within reactant volume along light path, and t is time.


Maple pdsolve gives:


pdsolve(pdesys, [J, C])

{C(x, t) = 0, J(x, t) = _F1(t)}, {C(x, t) = _F1(x)*_C1, J(x, t) = 0}



Above is a trivial 0 solution and it isn't what we want. I don't need a tool to tell me that anything multiplied by 0 is 0, and that df/dx is 0 if f doesn't depend on x.


The real solution was derived in 1977 by people at Institute of Mathematics, Uppsala University, Sweden and it is:


J := proc (x, t) options operator, arrow; J__0*exp(J__0*varepsilon*phi*t)/(exp(J__0*varepsilon*phi*t)+exp(C__0*varepsilon*phi*x)-1) end proc:


C := proc (x, t) options operator, arrow; C__0*exp(C__0^varepsilon*phi*x)/(exp(J__0*varepsilon*phi*t)+exp(C__0*varepsilon*phi*x)-1) end proc:``






Download Photo2.mw

@Carl Love He said that the function cannot be inverted in Maple. Otherwise it would be trivial.

@elahe If you cannot solve r from z = g(r) then you could compute values of z for a number of r values. Then you could interpolate z(r) usning an appropriate interpolation function, e.g. a polynomial. You obtain interpolation:

z(r) := Σ (ai·ri)

It should be possible to solve the above for r using solve() function. Then you could use this solution in w := f(r).

Better yet you can switch the roles of z and r before interpolation so you obtain:

r(z) := Σ (bi·zi)

Then you could use this interpolation in your w := f(r). There are a number of interpolation functions available in Maple. Splines are one of the best but have limitted number of derivatives. Polynomials have N (number of data points ) derivatives but may oscillate around your data if N is too small. Try your interpolation by plotting both your points and function to se if interpolation is right. If you compute a large number of points then a spline of order 1 (straight line) may be used.

You need to obtain r from z := g(r), perhaps using solve(), which will be a function of z. Then you substitue r in w := f(r) and obtain w as a function of z. Now you can plot w in terms of z.

@Doug Meade Yes, it works but it returns ( ) → rhs. I don't like the empty parenthesis. Thanks.

@anton_dys Suppose that sol := pdsolve(...) returns w(x,y) = -a*x+y. Then w := (x,y) → rhs(sol) doesn't work. Thanks.

@Carl Love Yes, it works ok and the result is returned as if I wrote it manually. Good. Thanks.

Page 1 of 1