# Problem with Solve in harmonic oscillator

Why is the result not Indeterminate?

Solve[x == a Cos[ω t + ϕ] /. {x -> 0, t -> 0, ϕ -> π/2}, a]


when the result should be

0/Cos[π/2]


Power::infy: Infinite expression 1/0 encountered.

Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered.

Out:= Indeterminate

• Quit the kernel and try again. I cannot reproduce your problem. Evaluating x == a Cos[ω t + φ] /. {x -> 0, t -> 0, φ -> π/2} simply gives True, and so you're effectively solving Solve[True, a], which has no solution: {{}}. – Roman Jul 1 at 17:03
• I already did that but it's still doing the same. My result is has no solution {{}} too, but Why? if the solution is indeterminate. – Andres Jul 1 at 17:06
• What is your \$Version? – Roman Jul 1 at 17:07
• my version is the 12.0 – Andres Jul 1 at 17:11
• Again: you have the equation 0==0, which is True, and you're solving it for a, which gives no solution because there is no information about a in your equation. Why do you expect Indeterminate? – Roman Jul 1 at 17:13

## 2 Answers

When I run your code, I get:

Solve[x == a Cos[\[Omega] t + \[Phi]] /. {x -> 0, t -> 0, \[Phi] -> \[Pi]/2}, a]
{{}}


As @MichaelE2 points out, this means a "full-dimensional solution" (as documented in the help file for Solve). The reason this occurs is because the equation contains

a Cos[\[Omega] t + \[Phi]] /. {x -> 0, t -> 0, \[Phi] -> \[Pi]/2}
0


which evaluates to zero. So you are effectively solving

Solve[0 == a*0, a]
{{}}


which similarly returns a full dimensional solution set. In this case, since a is the variable being solved for, this may be interpreted as "true for all a".

• Note: {} indicates an empty solution set, while {{}} indicates a full-dimensional component. – Michael E2 Jul 1 at 17:28
• If we solve to variable A : then 0 / cos 90 is equal a indeterminate, only that was my question. But I saw other result and this alarmed me. – Andres Jul 1 at 17:52

ContourPlot shows the possible solutions:

ContourPlot[0 == a Cos[y] , {y, 0, Pi}, {a, -1, 1}, FrameLabel -> {y, a}] 