1

What function could I use to solve this equation for x:

E^(-x^2) = 1 - Cos[x]

I tried Solve, Reduce, Root... None of them worked.

FindInstance gave me an imaginary answer.

Adding Reals, gave me:

{{x -> Root[{-1 + E^-#1^2 + Cos[#1] &, -6.28318531096301494721675292506}]}}

but this is not the answer I wanted, which would be between 0 and 1.

How would I solve this?

As a side note, WolframAlpha got it.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
kukac67
  • 111
  • 2

1 Answers1

3

This?

NSolve[E^(-x^2) == 1 - Cos[x] && 0 < x < 1, x]
(* {{x -> 0.941944}} *)

Or this?

FindRoot[E^(-x^2) - (1 - Cos[x]), {x, 1}]
(* {x -> 0.941944} *)
Michael E2
  • 235,386
  • 17
  • 334
  • 747