newbie, solving an equation numerically





On Thu, 30 Nov 2006, Daniel Lakeland wrote:

> On Thu, Nov 30, 2006 at 05:33:03PM +0100, Hugo Coolens wrote:
>> I'm trying to make Maxima solve the following equation
>>
>> h1(s):=1/(1+tau[1]*s);
>> h2(s):=1/(1+tau[2]*s);
>> x(s):=1/s;
>> tau[1]:33e-6;
>> tau[2]:33e-6;
>> solve(ilt(h1(s)*h2(s)*x(s),s,t)=0.1,t);
>>
>> unfortunately Maxima just shows me the transcendent equation I want it to
>> solve?
>>
>> How should I proceed now?
>
> Since you say you want a numerical solution, you should use the
> function find_root
>
> However, I think I'm seeing a bug in find_root. for example I think I
> ought to be able to do:
>
> eqn:first(solve(ilt(h1(s)*h2(s)*x(s),s,t)=0.1,t));
>
> find_root(eqn,t,0,2);
Is find_root a separate package? Where can I find it?

I'll try it out on my system and tell you what the result is

regards,
hugo


>
> but in fact I get
>
> (%i8) find_root(eqn,t,0,2);
> Maxima encountered a Lisp error: Error in MACSYMA-TOP-LEVEL [or a callee]:
> 					((MEQUAL SIMP) $T
>                                            ((MTIMES SIMP)                                             ((RAT SIMP) 1 10000000)                                             ((MPLUS SIMP) -330                                              ((MTIMES SIMP) 297                                               ((MEXPT SIMP) $%E                                                ((MTIMES SIMP)                                                 ((RAT SIMP) 1000000                                                  33)                                                 $T)))))) is not of type (OR                                                                          RATIONAL                                                                          LISP:FLOAT).Automatically continuing.To reenable the Lisp debugger set *debugger-hook* to nil.
>
> However, when I type in the following it works:
>
> (%i35) find_root(t = (297 * %e ^ (1000000 * t / 33) -330)/10000000,t,0,2);
> (%o35) 1.7549783076857204*10^-5
>
> What's going on?
>
>
> -- 
> Daniel Lakeland
> dlakelan at street-artists.org
> http://www.street-artists.org/~dlakelan
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>