3713 Reputation

17 Badges

5 years, 353 days

MaplePrimes Activity

These are replies submitted by mmcdara


Thank you Tom, this is already a first step to the soluttoipn of the reverse problem.
The assumption mu >0 is indeed unjustified, but it introduces the idea to split the (mu, x) domain in 4 subdomains (mu<0, x<0, ... mu>0, x>0) on which the "proof" could be derived more easily.

For your information, f represents the PDF of a Generalized Gaussian random varable whose F is the CDF.
See for instance Generalized_normal_distribution
One can find the expression of F in several sources but I can't find any one where the details of its computation.



J := Int(psi*sin(Pi*n*x/l), x=0..l):
J = value(%)  assuming l::real



Based on @Rouben Rostamian's answer I'd suggest these modifications

	plot(sin(x), x=-2*Pi..2*Pi, color="Green"),
	line([-2*Pi,0], [2*Pi,0]),
	line([0,-2*Pi], [0,2*Pi]),
        seq(circle([0, 0], k*Pi/2, color=gray, linestyle=3), k=1..4),
        textplot([2*Pi, 0, 'x'], 'align'={above, right}),
        textplot([0, 2*Pi, 'y'], 'align'={above, left}),
p3 := rotate(%, Pi/4):
display(p1,p3, scaling=constrained);


I'm not sure the curve you plot is correct:



e := r-sec(theta-Pi/4);
discont(sec(theta), theta);





ec := eval(e, [r=sqrt(x^2+y^2), theta=arctan(y/x)]);

opts := gridlines=true, color=blue, thickness=3:
plots:-implicitplot(ec=0, x=0..2, y=0..2, opts);




opts := opts, gridrefine=5:
  plots:-implicitplot(ec=0, x=0..2, y=-2..2, opts),
  plots:-implicitplot(ec=0, x=-2..0, y=-2..2, opts)


# left and right limits of ec at x=0

LL0 := limit(ec, x=0, left ) assuming y < 0;
LR0 := limit(ec, x=0, right) assuming y > 0;

eval(LL0, y=-sqrt(2));
eval(LR0, y=+sqrt(2));












@Rouben Rostamian  

Very clear illustration Rouben, I vote up


Maybe a question of translation?
The method of lines you are talking about, seems to me as an alternate name (maybe I'm mistaken) for the method of characteristics used to solve hyperbolic pdes or diffusion-convection equations.
I think that, more simply, what the OP is refering to is a Finite Difference (en [x,y]) Time Domain method (FDTD) or even simpler tha classical numerical method to solve elliptic pdes after space-time separation.

@yangtheary @vv  
and all involved people...

The solution is given at page 79 (problem 4.10) of "INTRODUCTION TO FUNCTIONAL EQUATIONS, theory and problem-solving strategies for mathematical competitions and beyond" by  Costas Efthimiou
Free pdf here 100914book.pdf

The method to solve this kind of functional equations (termed "Equations Reducing to Algebraic Systems") is explained in details from pages 69 to 79 with a link to Group Theory.



You're welcome

An example is provided in Maple's help pages: help(pdsolve[boundaryconditions]).
In the See Also section of this help page click on  pdsolve[boundaryconditions].
Unfold then the section Three Textbook Examples in the new document.

sys[5] := [diff(u(x,t), x, x) - (1/c^2)*diff(u(x,t), t, t) = 0, u(x,0) = f(x), D[2](u)(x, 0) = g(x)];

illustrate how to declare that diff(u(x, t), t)=g(x) for any x value at time t=0.
The notation D[2](u) means "the derivative of u(x,t) withe respect to its 2nd argument (here t):

a := D[2](u)(x, 0);
convert(a, diff);  # the display is prettier in a worksheet
                         D[2](u)(x, 0)
                     / d                     \
                eval| ---- u(x, t1), {t1 = 0}|
                     \ dt1                   /

For an example (1D diffusion equation over  XxT = (0, 1)x(0, +oo) and a Neuman boundary condition at t=0) see here
The Neuman boundary condition then writes

D[1](u)(0,t) =A(t)

More axamples can be found here index.htm



Please refer to my previous reply.

Concerning your "I think the issue is that the writer of this package had a different mental model of what graphs were" comment:

  • The CycleBasis function operates (at least in Maple 2015, I don't have newer versions right now to check this on them) on undirected graph only.
    See the attached file to verify this.
  • The convenient term to use for directed graphs is circuit, not cycle (see my previous reply).
    Unfortunately there is no mention of any function designed to manipulate circuits in Maple 2015 (in newer versions ???)
  • As it's shown in the attached file you can cheat to find the circuits (if any) of a directed graph:
    • transform the originall directed graph G into an undirected one UG
    • use CycleBasis to find the cycles of UG
    • check if these cycles form a circuit in G




G := Graph({[1,2],[2,3],[3,1]});

GRAPHLN(directed, unweighted, [1, 2, 3], Array(%id = 18446744078255432038), `GRAPHLN/table/1`, 0)




Error, (in GraphTheory:-CycleBasis) input graph must be undirected


map(e -> {e[]}, Edges(G))

{{1, 2}, {1, 3}, {2, 3}}


# Make G undirected

UG := Graph(map(e -> {e[]}, Edges(G))):
CUG := CycleBasis(UG)[];


[1, 2, 3]


# Is CUG a circuit of G ?
# If this is so, then there exists in G a path from CUG[1] to CUG[-1].
# Simply here:

is(ShortestPath(G, CUG[1], CUG[-1]) = CUG)



# For a more complex graph a simple way is to check if the
# list of Arrivals of vertices in CUG is equal to the CUG
# rotated to the left:

alias(LTR = ListTools:-Rotate):
Arrivals~(G, CUG);
is(op~(%) = LTR(CUG, -1));

[[3], [1], [2]]




# Finally the circuit is (up to an arbitrary rotation) is

Potential_Circuit := map(n -> [CUG[n], LTR(CUG, n)[1]], CUG);

[[1, 2], [2, 3], [3, 1]]





In the present case, is there an advantage in using implicitdiff instead of this "basic" method?


diff(2*x*y^3 + 3*x^2*y = 1, y):
isolate(%, diff(x, y));
map(factor, %)

diff(x, y) = (-6*x*y^2-3*x^2)/(2*y^3+6*x*y)


diff(x, y) = -(3/2)*x*(2*y^2+x)/(y*(y^2+3*x))






You might find this site interesting:
index.htm    (Wave PDE in 1D)
and more particularly
inse30.htm   (Finite length string)
and next

BTW: your file can't be loaded

Can't reproduce for toy functions
(Maple 2015, Mac OS X)

@vv @tomleslie

While I agree with your explanation, don't you think this reveals a regression of Maple since 2019?
Note that even larger values of the Poisson parameter works well (nevertheless slowly) in Maple 2015, and I guess until Maple 2018.

CodeTools:-Usage( Histogram(Sample(Poisson(10^4),10000)) ):
memory used=274.52MiB, alloc change=-9.65MiB, cpu time=1.90s, real time=1.67s, gc time=358.01ms



Thank you acer, I definitely think my 2015  is getting old

First 7 8 9 10 11 12 13 Last Page 9 of 86