# Solve this nonlinear delayed differential equation?

**URL:** <https://community.wolfram.com/t/solve-this-nonlinear-delayed-differential-equation/8657>\
**Category:** Questions\
**Tags:** calculus, equation-solving, numerical-computation\
**Created:** [May 29, 2016, 6:20pm UTC](https://community.wolfram.com/t/solve-this-nonlinear-delayed-differential-equation/8657 "2016-05-29T18:20:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerico](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jerico/32/18224_2.png) [@jerico](https://community.wolfram.com/u/jerico)\
**Post date:** [May 29, 2016, 6:20pm UTC](https://community.wolfram.com/t/solve-this-nonlinear-delayed-differential-equation/8657/1 "2016-05-29T18:20:46Z")

</div>

I am using NDSolve for the solution of the following delayed, dynamical nonlinear system

```
NLSol = NDSolve[{Derivative[1][cf][t] == -400. cf[t] + 
     124450.79348 Sin[100 \[Pi] t] - 
     400. Sign[-0.4 Cos[100 \[Pi] t] + TriangleWave[1000 t]] vdc[t], 
   Derivative[1][vdc][t] == 
    1000. cf[t] Sign[-0.4 Cos[100 \[Pi] t] + TriangleWave[1000 t]], 
   Derivative[1][a0][t] == 50 (cf[t] - cf[t - 1/50]), 
   cf[t /; t <= 0] == 0, vdc[t /; t <= 0] == 0, 
   a0[t /; t <= 0] == 0}, {cf[t], vdc[t], a0[t]}, {t, 0, 0.5}]

```

I am not sure what I am doing wrong to get the error "Input value {0.48} lies outside the range of data in the   
interpolating function "  
Please, help.  
Thanks in advance  
Jesus Rico

---

<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:** [May 29, 2016, 10:48pm UTC](https://community.wolfram.com/t/solve-this-nonlinear-delayed-differential-equation/8657/2 "2016-05-29T22:48:22Z")

</div>

Hi,

I haven’t had much time to play around with it, but this seems to work ok-ish:

```
NLSol = NDSolve[{Derivative[1][cf][t] == -400. cf[t] + 124450.79348 Sin[100 \[Pi] t] - 400. Sign[-0.4 Cos[100 \[Pi] t] + TriangleWave[1000 t]] vdc[t], Derivative[1][vdc][t] == 1000. cf[t] Sign[-0.4 Cos[100 \[Pi] t] + TriangleWave[1000 t]], Derivative[1][a0][t] == 50 (cf[t] - cf[t - 1/50]), 
cf[t /; t <= 0] == 0, vdc[t /; t <= 0] == 0, a0[t /; t <= 0] == 0}, {cf[t], vdc[t], a0[t]}, {t, 0, 0.5}, Method -> {"DiscontinuityProcessing" -> False, 
"TimeIntegration" -> "Adams"}]

```

At least in the sense that it integrates over the entire interval. Then you can plot it:

```
Plot[{cf[t] /. NLSol[[1]], vdc[t] /. NLSol[[1]], a0[t] /. NLSol[[1]]}, {t, 0, 0.5}, PlotPoints -> 200, PlotStyle -> {Blue, Red, Green}]

```

 ![ScreenShot2016-05-29at23.47.30.png](https://global.discourse-cdn.com/wolfram/original/3X/7/2/72be6fe580a279558628f5bf8f29073b70edd4b3.png)

Cheers,

Marco

---

<div class="post-metadata">

**Author:** ![jerico](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jerico/32/18224_2.png) [@jerico](https://community.wolfram.com/u/jerico)\
**Post date:** [May 30, 2016, 1:34am UTC](https://community.wolfram.com/t/solve-this-nonlinear-delayed-differential-equation/8657/3 "2016-05-30T01:34:55Z")

</div>

Marco,  
It is working as expected. Thank you very much!  
I guess some of us are very used to the idea that Mathematica would find the appropriate parameters for integration automatically. We have to be careful with that assumption.

Thanks again.

Jesus
