On Friday, April 13, 2012 09:58 PM, Jaime Villate wrote:
Hi Jaime,
Thanks for you reply.
I plotted these two function which is also shown in the script (though I
used wxplot2d). They show overlapped curves.
With regard to `quad_qags`, I also tried `integrate` instead. The
behavior is simply same.
Cheers,
Ning
> On 04/13/2012 01:26 PM, Ning Guo wrote:
>> I'm using rk to solve a differential equation set. The script is
>> attached. There is a piecewise function I wrote in two ways: q(s) and
>> qq(s), where q(s) is simplified from pp(s) so actually they are
>> equivalent. But when I use them in the differential equation, one
>> (q(s)) is solvable and the other (qq(s)) is not which results in a
>> following error:
>>
>> expt: undefined: 0 to a negative exponent.
>>
>> Besides, the solved results are also not good (not smooth solution).
>> What causes these problems? Thanks.
> Hi,
> I'm not fully convinced that q(s) and qq(s) are equivalent but I have
> not looked at them carefully.
> It is also hard to tell whether they are smooth functions, since the
> involve numerical integrations using quad-qags.
>
> Have you made a plot2d of q(s) and qq(s)? A numerical problem with one
> of the functions and the equivalence and smoothness of them will be
> easier to check with plot2d, before using rk.
>
> Cheers,
> Jaime
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
--
Geotechnical Group
Department of Civil and Environmental Engineering
Hong Kong University of Science and Technology
Clear Water Bay, Kowloon, Hong Kong