## Let us say x=y*cos(y), what does y equals in terms of x?

**Moderators:** gmalivuk, Moderators General, Prelates

### Let us say x=y*cos(y), what does y equals in terms of x?

Just a problem I've been stuck on recently... sadly wolfram alpha exceeds the standard computation time so sadly I can't simply use that as I normally do. So how can you go about solving it? I'm currently at a loss, so I hopes someone here could help me solve it; any ideas?

### Re: Let us say x=y*cos(y), what does y equals in terms of x?

So in other words, you're trying to find the inverse of f(x) = x*cos(x). Since it's not injective, you'll have to restrict the domain in order to get a partial inverse.

gmalivuk wrote:Yes. And if wishes were horses, wishing wells would fill up very quickly with drowned horses.King Author wrote:If space (rather, distance) is an illusion, it'd be possible for one meta-me to experience both body's sensory inputs.

- Lopsidation
**Posts:**183**Joined:**Tue Oct 27, 2009 11:29 pm UTC

### Re: Let us say x=y*cos(y), what does y equals in terms of x?

There's no inverse in terms of elementary functions. Either get lucky with your value of x, or use a numerical approximation.

- Forest Goose
**Posts:**377**Joined:**Sat May 18, 2013 9:27 am UTC

### Re: Let us say x=y*cos(y), what does y equals in terms of x?

If you like horrible things and questionable assumptions:

Assume y(x) is analytic, then

z

,z being the derivative of y.

Then, substitute in a power series for y and use the rule for powers to get a nasty nasty recurrence relation.

I tried doing the above, then assuming y was quadratic, but it just gives an equation that doesn't work (which is obvious, in reflection, and could've saved a lot of time if I thought about it). At any rate, numerical methods are probably the best bet.

Assume y(x) is analytic, then

z

^{2}y^{4}= x^{2}z^{2}(y^{2}- 1) + y(y - 2xz),z being the derivative of y.

Then, substitute in a power series for y and use the rule for powers to get a nasty nasty recurrence relation.

I tried doing the above, then assuming y was quadratic, but it just gives an equation that doesn't work (which is obvious, in reflection, and could've saved a lot of time if I thought about it). At any rate, numerical methods are probably the best bet.

Forest Goose: A rare, but wily, form of goose; best known for dropping on unsuspecting hikers, from trees, to steal sweets.

### Re: Let us say x=y*cos(y), what does y equals in terms of x?

Could the Lambert W function help solve this? The Lambert W function is the function W(z) such that z = W(z)*exp(W(z)), in other words it's the inverse of z*exp(z). And cos(z) = Re(exp(i*z)) = (exp(i*z) + exp(-i*z))/2, so it seems like we might be able to get something from this.

x = y*cos(y)

x = y/2*(exp(i*y) + exp(-i*y))

2i*x = i*y*exp(i*y) + i*y*exp(-i*y)

???

x = y*cos(y)

x = y/2*(exp(i*y) + exp(-i*y))

2i*x = i*y*exp(i*y) + i*y*exp(-i*y)

???

### Re: Let us say x=y*cos(y), what does y equals in terms of x?

Forest Goose wrote:If you like horrible things and questionable assumptions:

Assume y(x) is analytic, then

z^{2}y^{4}= x^{2}z^{2}(y^{2}- 1) + y(y - 2xz)

,z being the derivative of y.

Then, substitute in a power series for y and use the rule for powers to get a nasty nasty recurrence relation.

I tried doing the above, then assuming y was quadratic, but it just gives an equation that doesn't work (which is obvious, in reflection, and could've saved a lot of time if I thought about it). At any rate, numerical methods are probably the best bet.

I suspect you are on the right track, but I would like to know how you found that equation.

Actually... I was about to suggest a Fourier Expansion, but since that is y cos y, not y cos x, that won't work.

edit: wait x = y cos x is trivial. Whoops

Editx2

X is y cos y

Dx is dy cos y minus y dy sin y

Dy dx is one over (cos y minus y sine y)

This is an equation that might be easier to solve.

Easier in some sense.

Editx3: no it is not easier this way; the standard solution to doing odes will give you x equals y cos y.

Editx4: actually, you can reduce(?) that ode to

Dy/dx is y/(x-y sqrt(yy-xx)).

not sure if this is better. No trig functions, yes, but...???

- Forest Goose
**Posts:**377**Joined:**Sat May 18, 2013 9:27 am UTC

### Re: Let us say x=y*cos(y), what does y equals in terms of x?

I made a sign error with the equation (that's what you get for doing things in notepad...) Anyways:

Put C and S for cos y and sin y, respectively.

x = yC => 1 = zC - yzS => yzS = zC - 1 => y

Then,

x

y

y

*While drunk on...let's say holiday cheer...I was thinking about this, and I'm pretty sure there is a nicer polynomial in x, y, and z than the one above - but I forget how I got to it; it didn't have 6th degree (combined) terms, but I think 4th was the highest...that might be more tractable if anyone can figure it out (it was almost the same method, which is why I'm struggling to remember the difference...I'll post if it comes back to mind. I'm not sure polynomials of power series is, really, going to yield a nice answer in any case - unless it is really really needed, the recurrence relation on coeffs. is just horrid - more suited to Halloween...being scary and all...I'll stop now).

--If exactness isn't required, you can always expand C to a power series, truncate at the cubic term, have a 4th degree poly in y, then solve using the quintic formula with x as a coeff; you get 4 choices per x, and I'm not sure how good the over all solution is - I haven't tried it.

Put C and S for cos y and sin y, respectively.

x = yC => 1 = zC - yzS => yzS = zC - 1 => y

^{2}S^{2}= (x / y - 1 / z)^{2}= x^{2}/ y^{2}- 2x / yz + 1 / z^{2}.Then,

x

^{2}+ y^{2}S^{2}= y^{2}(C^{2}+ S^{2}) = y^{2}, soy

^{2}= x^{2}+ x^{2}/ y^{2}- 2x / yz + 1 / z^{2}=>y

^{4}z^{2}= x^{2}z^{2}(y^{2}+ 1) + y(y - 2xz)*While drunk on...let's say holiday cheer...I was thinking about this, and I'm pretty sure there is a nicer polynomial in x, y, and z than the one above - but I forget how I got to it; it didn't have 6th degree (combined) terms, but I think 4th was the highest...that might be more tractable if anyone can figure it out (it was almost the same method, which is why I'm struggling to remember the difference...I'll post if it comes back to mind. I'm not sure polynomials of power series is, really, going to yield a nice answer in any case - unless it is really really needed, the recurrence relation on coeffs. is just horrid - more suited to Halloween...being scary and all...I'll stop now).

--If exactness isn't required, you can always expand C to a power series, truncate at the cubic term, have a 4th degree poly in y, then solve using the quintic formula with x as a coeff; you get 4 choices per x, and I'm not sure how good the over all solution is - I haven't tried it.

Forest Goose: A rare, but wily, form of goose; best known for dropping on unsuspecting hikers, from trees, to steal sweets.

### Who is online

Users browsing this forum: No registered users and 6 guests