# Solve $1/a - \sin(1/a)$ [duplicate]

I need to find $a$ from this equation:

Solve[(2*b)/a - 1/(n*π)*Sin[(2*n*π*b)/a] - 1/2 == 0, a]


but I get the response:

Solve::nsmet: This system cannot be solved with the methods available to Solve.

I have also tried other methods: NSolve, Root, Reduce etc but it is always the same. Is there any way to solve this?

• Are there any assumptions for n and b? I guess that n is a non-negative integer, but b? – mattiav27 Jan 21 '17 at 19:28
• Obviously this system cannot be solved analyticaly. It's not a MA problem. The solution can be found numericaly only. – cyrille.piatecki Jan 21 '17 at 20:25
• This problem is equivalent to Solve[Sin[x] == x, x], which has only one solution. FindInstance[Sin[x] == x, x] gives it, {{x -> 0}}. – bbgodfrey Jan 21 '17 at 20:37
• @mattiav27 n is a non-negative integer, b is given and b<a, both non-negative – Wojciech Wróblewski Jan 21 '17 at 21:47

Setting $x=a/b$ the equation is

eqn = (-1/2 + 2 x - Sin[2 x n π]/(n π)) == 0


Hopefully it is obvious that there is a solution $x=1/4$ for even $n$. For odd $n$ the solution will shift away from $1/4$ because of the sin term. Write $x=1/4 + e/{(2 \pi n)}$ and we get this for $e$:

Simplify[eqn /. {x -> 1/4 + e/(2 π n)}, n ∈ Integers && n > 0] // TrigExpand
(* e == Cos[(n π)/2] Sin[e] + Cos[e] Sin[(n π)/2] *)


If $n$ is even we have $e=\sin (e)$ so $e=0$ as previously observed. If $n$ is odd we have $e=\cos(e) sin(n \pi/2)$. In general we can say $e=q \sin(n\pi /2)$ where $q$ is the solution to the transcendental equation $y=\cos(y)$ (This we will have to find numerically).

Thus we can write the solution as

q = y /. FindRoot[y == Cos[y], {y, 0.5}, WorkingPrecision -> 30]
(* 0.739085133215160641655312087674 *)

x = 1/4 + q Sin[n π/2]/(2 π n)


Checking the result for the first few n:

Table[eqn, {n, 10}]
(* {True, True, True, True, True, True, True, True, True, True} *)


Visualize the solutions for $x$ vs $n$:

DiscretePlot[x, {n, 1, 30}, PlotRange -> {0, 0.5}, AxesLabel -> {"n", "x"}]


The only way to solve your equation for a is numerical, assigning values to n and b. Here I choose some random ones.

b = 1; n = 2;
Plot[{-1/(n*π)*Sin[(2*n*π*b)/a], -(2*b)/a + 1/2}, {a, -10,10}]


f[a_] := (2*b)/a - 1/(n*π)*Sin[(2*n*π*b)/a] - 1/2;
FindRoot[f[a] == 0, {a, 3}]


{a -> 4.}

f[4]


0