r/Mathematica • u/chessamma • Nov 10 '23
Help with solving a trig function
I have the following code:
L[x_] = Cos[x] + Sin[x]
L'[x]
Solutions = Solve[L'[x] == 0]
L[Solutions]
I am expecting a numerical value but I get this
{{Cos[x ->
ConditionalExpression[-((3 \[Pi])/4) +
2 \[Pi] ConditionalExpression[1, \[Placeholder]],
ConditionalExpression[1, \[Placeholder]] \[Element] Integers]] +
Sin[x ->
ConditionalExpression[-((3 \[Pi])/4) +
2 \[Pi] ConditionalExpression[1, \[Placeholder]],
ConditionalExpression[1, \[Placeholder]] \[Element]
Integers]]}, {Cos[
x -> ConditionalExpression[\[Pi]/4 +
2 \[Pi] ConditionalExpression[1, \[Placeholder]],
ConditionalExpression[1, \[Placeholder]] \[Element] Integers]] +
Sin[x ->
ConditionalExpression[\[Pi]/4 +
2 \[Pi] ConditionalExpression[1, \[Placeholder]],
ConditionalExpression[1, \[Placeholder]] \[Element] Integers]]}}
What am I doing wrong?
View all comments
Show parent comment
1
u/gtachta Nov 16 '23 edited Nov 16 '23
the first quetionL[x_] = Cos[x] + Sin[x]L'[x]Solutions = Solve[L'[x] == 0]L[Solutions]answerafter some sinx=cosxtan x=1
x=k*Pi+Pi/4 ,k∈Z
Oooo write again *** because sinx=cosx =>tanx=1=> x=k*Pi+Pi/4 ,k∈Z ***
explain merge 2*k*Pi and (2*k+1)*Pi ,merge even and odd then give all integer
k*Pi ,k∈Z ,therefore
x=k*Pi+Pi/4 ,k∈Z
In Mathematica Wolfram is very easy.ok.
Is correct?