# NDSolve documentation example doesn't work on 14.1

**URL:** <https://community.wolfram.com/t/ndsolve-documentation-example-doesnt-work-on-14-1/24482>\
**Category:** Questions\
**Tags:** equation-solving, numerical-computation\
**Created:** [August 26, 2024, 12:44pm UTC](https://community.wolfram.com/t/ndsolve-documentation-example-doesnt-work-on-14-1/24482 "2024-08-26T12:44:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierredehez](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/pierredehez/32/4120_2.png) [@pierredehez](https://community.wolfram.com/u/pierredehez)\
**Post date:** [August 26, 2024, 12:44pm UTC](https://community.wolfram.com/t/ndsolve-documentation-example-doesnt-work-on-14-1/24482/1 "2024-08-26T12:44:24Z")

</div>

NDSolve does not work with 14.1. Using the examples available in the Help, like:

```
s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}]

```

leads to an error message:

```
NDSolve::deqn: Equation or list of equations expected instead of False in the first argument {(y^\[Prime])[x]==Cos[x+y[x]] y[x],False}.

```

Any hint ?

---

<div class="post-metadata">

**Author:** ![ahmed](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/ahmed/32/5858_2.png) [@ahmed](https://community.wolfram.com/u/ahmed)\
**Post date:** [August 26, 2024, 2:06pm UTC](https://community.wolfram.com/t/ndsolve-documentation-example-doesnt-work-on-14-1/24482/2 "2024-08-26T14:06:52Z")

</div>

Works fine with my V14.1  
Maybe you have y pre-defined. Try on fresh kernel?

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/c532fd9d-32e7-4784-8781-a3325d2614d8)

---

<div class="post-metadata">

**Author:** ![mroge02](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mroge02/32/28775_2.png) [@mroge02](https://community.wolfram.com/u/mroge02)\
**Post date:** [August 26, 2024, 4:57pm UTC](https://community.wolfram.com/t/ndsolve-documentation-example-doesnt-work-on-14-1/24482/3 "2024-08-26T16:57:13Z")

</div>

As Ahmed said, you seem to have defined `y[0]`. This is usually done by accident using a single `=` instead of a double `==` in an earlier code. You can restart the kernel or try `y[0] =.` or `Clear[y]`.

It’s trickier when one makes this mistake on the derivative equation. To clear `y'[x]`, you use `Clear[Derivative]` or `y'[x] =.` (this does not seem necessary in the OP’s case, though.)

---

<div class="post-metadata">

**Author:** ![pierredehez](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/pierredehez/32/4120_2.png) [@pierredehez](https://community.wolfram.com/u/pierredehez)\
**Post date:** [August 27, 2024, 1:43pm UTC](https://community.wolfram.com/t/ndsolve-documentation-example-doesnt-work-on-14-1/24482/4 "2024-08-27T13:43:39Z")

</div>

You are right! I did’nt realize that when opening a new Notebook, variables previously defined were still active. Thanks to both of you!
