Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.5K Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Find the roots of a non-linear ODE using FindRoot?

Posted 6 years ago

Clearly, I don't have a great understanding of Mathematica, but I cannot figure out any way to find the roots of this equation. It is a non-linear ODE (Emden's Equation where n = 2). I just need to find the root of the equation so I can report the radius of the star/gas cloud. Can someone please enlighten me? I get this error every single time I do it. FindRootError

Attachments:
POSTED BY: Daniel Pearce
2 Replies
Posted 6 years ago

The first argument to FindRoot should be a function. But n2 is not a function, it is a replacement rule. So try the following, it "converts" n2 to a function.

FindRoot[y[x] /. n2, {x, 1}]
POSTED BY: Hans Milton
Posted 6 years ago

Works like a charm. Thanks a million!

POSTED BY: Daniel Pearce
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard