# Trouble solving an equation

## Homework Statement

i am looking for the potential extrema on the function y = |sinx(x)| + (1/x) between [-2pi, 2pi]

## Homework Equations

extrema will be likely located at f'(x) = 0 or u/d

## The Attempt at a Solution

first it is noted that there is a discontinuity at x=0
then determining f'(x) by using |sin(x)| as sqrt(sin2x) instead
we get f'(x) = sin(x)cos(x)/|sinx(x)| - x-2

first the easy one : we can see that f'(x) = u/d where sin(x) = 0 [looking only at the denominator here]
that will be at x= -2pi, -pi, pi, and 2pi

My problem is the second part
f'(x) = 0 when the whole equation = 0
0 = sin(x)cos(x)/|sinx(x)| - x-2
therefore
sin(x)cos(x)/|sinx(x)| = x-2
we get
sin(x)cos(x)/(sqrt(sin2x)) = x-2
a little algebra and then we get
x4 = sec2(x)

and now.... i am stuck.
is there a way to solve this particular equation?

Mark44
Mentor

## Homework Statement

i am looking for the potential extrema on the function y = |sinx(x)| + (1/x) between [-2pi, 2pi]

## Homework Equations

extrema will be likely located at f'(x) = 0 or u/d
An extremum can also occur at an endpoint of a closed interval.
fishspawned said:

## The Attempt at a Solution

first it is noted that there is a discontinuity at x=0
then determining f'(x) by using |sin(x)| as sqrt(sin2x) instead
we get f'(x) = sin(x)cos(x)/|sinx(x)| - x-2

first the easy one : we can see that f'(x) = u/d where sin(x) = 0 [looking only at the denominator here]
that will be at x= -2pi, -pi, pi, and 2pi

My problem is the second part
f'(x) = 0 when the whole equation = 0
0 = sin(x)cos(x)/|sinx(x)| - x-2
therefore
sin(x)cos(x)/|sinx(x)| = x-2
we get
sin(x)cos(x)/(sqrt(sin2x)) = x-2
a little algebra and then we get
x4 = sec2(x)

and now.... i am stuck.
is there a way to solve this particular equation?
Rather than replace ##|\sin(x)|## by ##\sqrt{\sin^2(x)}##, it might be simpler to look at your function on the two intervals for which ##\sin(x) \ge 0## and on the two intervals on which ##\sin(x) \le 0##. This would make the derivatives a bit simpler, but I think you will still have a hard time finding a solution algebraically.

tnich
Homework Helper

## Homework Statement

i am looking for the potential extrema on the function y = |sinx(x)| + (1/x) between [-2pi, 2pi]

## Homework Equations

extrema will be likely located at f'(x) = 0 or u/d

## The Attempt at a Solution

first it is noted that there is a discontinuity at x=0
then determining f'(x) by using |sin(x)| as sqrt(sin2x) instead
we get f'(x) = sin(x)cos(x)/|sinx(x)| - x-2

first the easy one : we can see that f'(x) = u/d where sin(x) = 0 [looking only at the denominator here]
that will be at x= -2pi, -pi, pi, and 2pi

My problem is the second part
f'(x) = 0 when the whole equation = 0
0 = sin(x)cos(x)/|sinx(x)| - x-2
therefore
sin(x)cos(x)/|sinx(x)| = x-2
we get
sin(x)cos(x)/(sqrt(sin2x)) = x-2
a little algebra and then we get
x4 = sec2(x)

and now.... i am stuck.
is there a way to solve this particular equation?
First, I am a little confused. In your original problem statement you said ##y = |sinx(x)| + (1/x)##, but the problem you have actually been working on is ##y = |sin(x)| + (1/x)##. So which is it?

A couple of suggestions: When you have an absolute in an equation, it can be helpful to consider each case separately. So in this problem for example, you could rewrite the function ##y = |sin(x)| + (1/x)## as

##y = \begin{cases}
sin(x) + (1/x) & \text{if } -2π \leq x < -π\text{ or }0 \leq x < π\\
-sin(x) + (1/x) & \text{if } -π \leq x < 0\text{ or }π \leq x < 2π
\end{cases}##

Now you can find the derivative for each case.

Sketching a plot of the function and it's derivative also helps in figuring out problems like this.

In answer to your question, no there is not an analytic solution to this problem. You could use a root-finding method like Newton-Raphson to find approximate solutions.

first off - OOPS - no we are using |sin(x)| - my apologies for the typo.

i was considering a linear approximation method. separating them into the two parts seems the easiest method.
thanks all.

this is one of those situations where i threw out a question to my students and never checked the solution first. we all just randomly picked a function for a curve sketch analysis. i was just running through it before class tomorrow and got to that point and realized i gave those little dudes something of far more complexity than i imagined.

Last edited by a moderator:
Ray Vickson