# NDSolve error inside Plot: $RecursionLimit :Recursion depth of 1024 exceeded

**URL:** <https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801>\
**Category:** Questions\
**Tags:** calculus, graphics-and-visualization, numerical-computation\
**Created:** [March 27, 2024, 10:34am UTC](https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801 "2024-03-27T10:34:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikolajkonstanczak](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@mikolajkonstanczak](https://community.wolfram.com/u/mikolajkonstanczak)\
**Post date:** [March 27, 2024, 10:34am UTC](https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801/1 "2024-03-27T10:34:33Z")

</div>

hello, i have been trying to plot the maximum range for theta for a projectile motion experiencing linear drag, but i keep getting errors regarding the written code. when trying to transform y[t] to a function yy[t\_] rather than the replacement rule there seems to be no wolfram language translation found and when rooting i get a message:$RecursionLimit  
:Recursiondepthof1024exceeded.

```
tfinal[theta_]:=[s=NdSolve[{x' ' [t] == b x' [t] , y' ' [t] == -b y' [t] - g, x[0] == 0, y[0] == 0, x'[0] == v Cos [theta], y'[0] == v Sin[theta]}, {x,y}, {t, 0, 10}]; 
    yy[t_] := y[t] /. s[[1]]; 
    xx[t_] := x[t] /. s[[1]]; 
    xfinal[theta_]:=x[tfinal[theta]]
    plot[xfinal[theta], {theta,0.01,2.5}

```

---

<div class="post-metadata">

**Author:** ![dontdont9](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dontdont9](https://community.wolfram.com/u/dontdont9)\
**Post date:** [March 27, 2024, 2:16pm UTC](https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801/2 "2024-03-27T14:16:43Z")

</div>

Maybe this will help you a little

```
sol=Simplify[{x[t],y[t]}/.DSolve[{x''[t]==b x'[t],y''[t]==-b y'[t]-g,x[0]==0,y[0]==0,x'[0]==v Cos[theta],y'[0]==v Sin[theta]},{x,y},t][[1]]];
yy[t_]:=sol[[2]];yy[t]
xx[t_]:=sol[[1]];xx[t]

```

which displays

```
(g*(1-E^(-b*t)-b*t)+b*(1-E^(-b*t))*v*Sin[theta])/b^2

```

and

```
((-1+E^(b*t))*v*Cos[theta])/b

```

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [March 27, 2024, 2:31pm UTC](https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801/3 "2024-03-27T14:31:19Z")

</div>

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/f399402b-2614-4f1e-ba1e-e71cba0e8093)

See [here](https://blog.wolfram.com/2010/09/27/do-computers-dumb-down-math-education/) for More

Regards M.I.

---

<div class="post-metadata">

**Author:** ![mikolajkonstanczak](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@mikolajkonstanczak](https://community.wolfram.com/u/mikolajkonstanczak)\
**Post date:** [March 27, 2024, 5:12pm UTC](https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801/4 "2024-03-27T17:12:54Z")

</div>

it seems like whenever i include sol= at the beginning of the equation, i get this error  
 ![wwww.PNG](https://global.discourse-cdn.com/wolfram/optimized/2X/c/cc125e87dde44af1e96530a0fdd36d495ece7ce0_2_931x52.png)

---

<div class="post-metadata">

**Author:** ![eric3](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/eric3/32/12760_2.png) [@eric3](https://community.wolfram.com/u/eric3)\
**Post date:** [March 27, 2024, 5:30pm UTC](https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801/5 "2024-03-27T17:30:52Z")

</div>

That looks like you’re trying to use the free-form input, which attempt to interpret natural language input. On Mac you get this by typing “Ctrl-=”, is that what you’re doing? What you want is just a plain input cell.

---

<div class="post-metadata">

**Author:** ![mikolajkonstanczak](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@mikolajkonstanczak](https://community.wolfram.com/u/mikolajkonstanczak)\
**Post date:** [March 27, 2024, 5:47pm UTC](https://community.wolfram.com/t/ndsolve-error-inside-plot-recursionlimit-recursion-depth-of-1024-exceeded/23801/6 "2024-03-27T17:47:05Z")

</div>

im not even on mac, and im using the online version of wolfram, but it seems to be using free format input none less
