On 26/10/2011 8:35 PM, Daniel Dalton wrote:
> Hello,
>
> I need to solve the following.
>
> 3^x=x+4
>
> My text book tells me to graph it and see where the graphs (y=x+4, and
> y=3^x) meet. Unfortunately, I'm blind and can't read very accurately off
> the graph, and thus am using maxima instead of the recommended devices
> by my school.
>
> I tried this:
> solve([y=x+4, y=3^x],[x,y]);
This can be solved with find_root().
Define a function f(x) = lhs - rhs
Try a few values to find that a root is in interval [2,3]
Find root numerically with find_root
(%i1) f(x):=3^x-x-4;
(%o1) f(x):=3^x-x-4
(%i2) f(0);
(%o2) -3
(%i3) f(1);
(%o3) -2
(%i4) f(2);
(%o4) 3
(%i5) find_root(f(x),x,1,2);
(%o5) 1.56191876632454