1
$\begingroup$

Basically I am trying to solve an algebraic function of the form y[x]=x^2+5x+7 with some initial conditions and I want to find y[x] in the region where x goes from 1 to 50. What is the right command and syntax to use for this? I am a little confused. I realize that NDSolve is for differential equations, while the format of NSolve does not allow me to enter initial conditions/range? So what's the right command to use.

$\endgroup$

closed as off-topic by Daniel Lichtblau, Henrik Schumacher, José Antonio Díaz Navas, m_goldberg, ilian Mar 9 '18 at 2:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Henrik Schumacher, m_goldberg, ilian
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ As I read your question, all you have to do is evaluate y[x_] := x^2 + 5 x + 7 $\quad$Then you can evaluate y for any numerical value; for example, y[2] will return 21 $\endgroup$ – m_goldberg Mar 8 '18 at 4:27
1
$\begingroup$

You have the solution for y[x].

y[x_] := x^2 + 5 x + 7;

There's no such notion of "initial conditions."

Then

Plot[y[x], {x, 1, 50}]
$\endgroup$
  • $\begingroup$ You are right, that makes sense. Basically I have a complicated set of Differential Equations; I was trying to start with some simple example to get a grasp of Mathematica. This example is not the right one though as like you said it is already a solution. $\endgroup$ – Vishal Verma Mar 8 '18 at 1:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.