On Fri, Apr 8, 2011 at 12:07 PM, Leo Butler <l.butler at ed.ac.uk> wrote:
>
>
> On Fri, 8 Apr 2011, Michael wrote:
>
> <
> < Doug:
> <
> < you need to put a quote in front of diff(y,x).
> <
> < Maxima will give you an implicit solution:
> <
> < (y*log(y)-x)/y = %c
> <
> < -michael
>
> I would think it is better form, and more self-documenting,
> to write:
>
> depends(y,x);
> diff(y,x)=....
>
> Here, Maxima will nounify diff in the second line because
> you have told it on the first that y is a function of x.
> If you just write
>
> 'diff(y,x)=....
>
> the ' will likely be a bit mysterious later when you look at
> the code.
>
> That's my 2p, anyway,
> Leo
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
I was under the mistaken idea that ode would know that y depends on x,
because I set y as the dependent and x as the independent variable.
ode2(diff(y)=y/(x+y),y,x);
Even so I should have tried:
ode2(diff(y,x)=y/(x+y),y,x);
and if I had read the help section I would have seen the quote, so this is
mostly my fault.
this is nice:
depends(y,x);
solve(ode2(diff(y,x)=y/(x+y),y,x),x);
Doug