f

#### Determining the stationary points of f(x)

```Hi, this is my first post here!
I've been looking at some past examples to determine the stationary points of f(x), but keep coming into errors wherever I look. 'm' is saved so shouldn't cause any issues, I just cant get past the issues with 'x'

The equation is : f(x) = (5*x^2)/(m(x^2+1))

Initially I tried:
>> f=(5*x^2)/(m(x^2+1))
Undefined function or variable 'x'.

Followed by (purely guessing to see if I could get it to work:
>> syms x
>> f=(5*x^2)/(m(x^2+1))
Error using sym/subsindex (line 766)
Invalid indexing or function definition. When defining a function, ensure that the arguments are symbolic variables and the body
of the function is a SYM expression. When indexing, the input must be numeric, logical, or ':'.

I seem unable to get past this, and any help would greatly be appreciated
``` 0  Lmore
12/20/2016 1:08:03 PM comp.soft-sys.matlab  211264 articles. 26 followers. 1 Replies 729 Views Similar Articles

[PageSpeed] 48

```On 12/20/2016 7:08 AM, Lmore wrote:
> Hi, this is my first post here!
> I've been looking at some past examples to determine the stationary points of f(x),
>but keep coming into errors wherever I look. 'm' is
>saved so shouldn't cause any issues, I just cant get past the issues with 'x'
>
> The equation is : f(x) = (5*x^2)/(m(x^2+1))
>
> Initially I tried:
>>> f=(5*x^2)/(m(x^2+1))
> Undefined function or variable 'x'.
>
> Followed by (purely guessing to see if I could get it to work:
>>> syms x
>>> f=(5*x^2)/(m(x^2+1))
> Error using sym/subsindex (line 766)
> Invalid indexing or function definition. When defining a function,
>ensure that the arguments are symbolic variables and the body
> of the function is a SYM expression. When indexing, the input must
>be numeric, logical, or ':'.
>
>
> I seem unable to get past this, and any help would greatly be appreciated
>

One way might be

clear
syms x m
f=(5*x^2)/(m*(x^2+1));
df=diff((5*x^2)/(m*(x^2+1)),x)

(10*x)/(m*(x^2 + 1)) - (10*x^3)/(m*(x^2 + 1)^2)

solve(df==0,x)

0

``` 0  Nasser
12/20/2016 9:00:35 PM