(* 10-9-23 nexxt real solution *) f0 = b + c x^2 + d x^4 f1 = ( e + f x^2 ) * (a^2-x^2) cons1 = ( ( f0 /. x -> 1 ) == ( f1 /. x -> 1 ) ) cons2 = ( ( D[f0,x] /. x -> 1 ) == ( D[f1,x] /. x -> 1 ) ) cons3 = ( ( D[f1,x] /. x -> a ) == 0 ) cons4 = ( Integrate[ f0,{x,0,1} ] == 1/4 ) cons5 = ( Integrate[ f1,{x,1,a} ] == 1/4 ) bcdef = ( Solve[ { cons1,cons2,cons3,cons4,cons5 }, {b,c,d,e,f} ] ) f0$s = ( f0 /. bcdef ) f1$s = ( f1 /. bcdef ) (* check area is 1 *) Factor[ Integrate[ f0$s, {x, -1, 1}] + 2 Integrate[ f1$s, {x, 1, a}] ] (* find astar *) rf0 = Integrate[ D[f0$s,x]^2, {x, -1, 1}] rf1 = 2 Integrate[ D[f1$s,x]^2, {x, 1, a}] rfa = First[ rf0 ] + First[ rf1 ] Plot[ rfa, {a,3.4,3.9} ] Solve[ D[rfa,a] == 0 ] aaa = ( N[ Solve[ D[rfa,a] == 0 ] ][[5]] ) aa = ( a /. aaa ) f0$star = First[ f0$s /. a -> aa ] f1$star = First[ f1$s /. a -> aa ] plt = Plot[ { f0$star Boole[ Abs[x]<1 ], f1$star Boole[ Abs[x]> 1 ] }, {x,-aa,aa} ] f0$1 = f0$star /. x -> 1 pts=ListPlot[{{-1,f0$1},{1,f0$1},{-aa,0},{aa,0}},PlotStyle -> {Red, PointSize@Large}] Show[ plt,pts ] rfa /. a -> aa