# Obtain the general solution for this equation?

Posted 4 months ago
606 Views
|
|
1 Total Likes
|
 I was working on this problem as a demonstration for Methods g[x_] = Sin[x]/E^x; Reduce[g'[x] == 0, x] produces C[1] \[Element] Integers && (x == -2 ArcTan[1 + Sqrt[2]] + 2 \[Pi] C[1] || x == -2 ArcTan[1 - Sqrt[2]] + 2 \[Pi] C[1]) Solve[g'[x] == 0, x] produces the first solutions between -Pi and Pi {{x -> -((3 [Pi])/4)}, {x -> [Pi]/4}} Solve[{g'[x] == 0, 0 <= x <= 4 Pi}, x] produces something similar to the reduce answer {{x -> 2 \[Pi] - 2 ArcTan[1 - Sqrt[2]]}, {x -> -2 ArcTan[1 - Sqrt[2]]}, {x -> 2 \[Pi] - 2 ArcTan[1 + Sqrt[2]]}, {x -> 4 \[Pi] - 2 ArcTan[1 + Sqrt[2]]}} I would like to know why it isn't producing the simpler solution x=(kPi+1)/4 k element of integersAlso I wondered why Mathematica joins the graph of h'[x] at 2 for the hybrid function h[x_] = Piecewise[{{-4, x <= 0}, {x^2 - 4, 0 < x < 2}, {x - 2, x >= 2}}]; when it is not continuous.
 For the last question, this does the trick: Plot[PiecewiseExpand[h'[x]], {x, -2, 3}]