# NDSolve syntax problem

**URL:** <https://community.wolfram.com/t/ndsolve-syntax-problem/2332>\
**Category:** Questions\
**Tags:** calculus, equation-solving\
**Created:** [June 7, 2014, 11:42am UTC](https://community.wolfram.com/t/ndsolve-syntax-problem/2332 "2014-06-07T11:42:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomasnettl](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tomasnettl](https://community.wolfram.com/u/tomasnettl)\
**Post date:** [June 7, 2014, 11:42am UTC](https://community.wolfram.com/t/ndsolve-syntax-problem/2332/1 "2014-06-07T11:42:51Z")

</div>

Hi,  
At first I am new here and new to Mathematica so sorry for any incomprehensions.  
I want to solve numerically the system of two ordinary differential equations

```
y'[t] == -0.25 y[t] + (x[t])^2
x'[t] = -0.25 x[t] + y[t] - x[t] y[t]

```

When I try that following the NDSolve manual it returns me an error message. I tried to findout something but didn´t succeed.  
Thanks for any help.

My code is attached.

---

<div class="post-metadata">

**Author:** ![mthiel](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mthiel/32/42877_2.png) [@mthiel](https://community.wolfram.com/u/mthiel)\
**Post date:** [June 7, 2014, 11:57am UTC](https://community.wolfram.com/t/ndsolve-syntax-problem/2332/2 "2014-06-07T11:57:45Z")

</div>

Hi Tomas,

it appears that you have typed a single equal sign for the equation of the x component. This here works:

```
NDSolve[{y'[t] == -0.25 y[t] + (x[t])^2, x'[t] == -0.25 x[t] + y[t] - x[t] y[t], x[0] == 1, y[0] == 1}, {x, y}, {t, 0, 10}]

```

If you plot this you get

```
sols =NDSolve[{y'[t] == -0.25 y[t] + (x[t])^2, x'[t] == -0.25 x[t] + y[t] - x[t] y[t], x[0] == 1, y[0] == 1}, {x, y}, {t, 0, 10}]

```

and

```
Plot[{x[t], y[t]} /. sols, {t, 0, 10}]

```

 ![NDSolve_err-2.jpg](https://global.discourse-cdn.com/wolfram/original/3X/5/d/5dcf1b033d00bf02571c46409a0ef88ce6d9e455.jpeg)

I hope this helps.

Cheers,  
M.

---

<div class="post-metadata">

**Author:** ![tomasnettl](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tomasnettl](https://community.wolfram.com/u/tomasnettl)\
**Post date:** [June 7, 2014, 12:08pm UTC](https://community.wolfram.com/t/ndsolve-syntax-problem/2332/3 "2014-06-07T12:08:45Z")

</div>

Thank you for the quick help Marco and a little encouragement.  
It works!
