Reputation: 113
I want to ask for the normalization coefficient of the solution f(x).
The implementation method in Mathematica is as follows:
f[x] := Sin[(n Pi x)/(2 a)];
norm = FullSimplify[1/Integrate[Abs[f[x]]^2, {x, 0, a}], n \[Element] Integers]
The final results are as follows: 2/a
I want to implement the same function in Maple, and have tried the following:
assume(n::posint);
psi := x -> sin(1/2*n*pi*x/a);
c := 1/int(abs(psi(x))^2, x = 0 .. a);
simplify(solve(c = 1, a));
Is there a good way to deal with it if it is implemented with Maple?
Upvotes: 1
Views: 99
Reputation: 7271
restart;
kernelopts(version);
Maple 2022.0, X86 64 LINUX, Mar 8 2022, Build ID 1599809
assume(n::posint);
f := abs(sin(1/2*n*Pi*x/a))^2:
simplify(combine(1/int(convert(f,Heaviside,x),
x=0..a)));
2
-
a
simplify(combine(1/int(f,x=0..a)))
assuming a::real;
2
-
a
Upvotes: 1