# [Maxima] Solving equation numerically

Robert Dodier robert.dodier at gmail.com
Fri Jan 25 00:37:21 CST 2008

```On 1/24/08, Dan Soendergaard <dan1990 at gmail.com> wrote:

> I'm completely new to Maxima. I use it as a Mathcad replacement in
> Linux which I am truly happy about.

I would be interested to hear if there is anything in Mathcad which
you miss in Maxima.

>Today, I was in class given the
> task to solve the given equation for x,
>
> sin(x) + x = 2.5*x + 1.5
>
> In Maxima I entered,
>
> > solve(sin(x) + x = 2.5*x + 1.5, x);
>
> which gives me,
>
> x = 5 * sin(x) + 7.5

Hmm. x = 5 * sin(x) + 7.5 doesn't appear to be equivalent
to sin(x) + x = 2.5*x + 1.5 ... Is there a typo somewhere?

> Isn't it possible to solve this equation numerically? I know that I
> should get three results for x since there are three intersection
> points.

I think you can plot the stuff returned by solve,

plot2d ([5*sin(x) + 7.5, x], [x, 0, 10]);

let's say, and use that to guess a range or ranges for find_root.
(find_root only tries to find one root.)

best,

Robert Dodier
```