deSolve enhancement

Messages in english

Modérateur : xcasadmin

fhub
Messages : 35
Inscription : lun. juin 22, 2009 8:30 pm

deSolve enhancement

Message par fhub » ven. oct. 25, 2013 11:00 am

Hi,

just in case you've overlooked my last answer yesterday (about deSolve in Xcas/HP-Prime) in the CCC-forum:
http://www.hpmuseum.org/cgi-sys/cgiwrap ... 744#253744

Regards,
Franz

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: deSolve enhancement

Message par parisse » ven. oct. 25, 2013 5:09 pm

Didn't see it, it's not very easy to find answers there, here at least you are sure I will read:-)
Well, I can certainly add cases for desolve if it's simple emough. It has never been a priority before because nobody asked (and I didn't need that myself).

fhub
Messages : 35
Inscription : lun. juin 22, 2009 8:30 pm

Re: deSolve enhancement

Message par fhub » sam. oct. 26, 2013 10:44 am

parisse a écrit :Well, I can certainly add cases for desolve if it's simple emough.
Yes, the type "independent of x" (i.e. y''=f(y,y')) is definitely something that you should implement, because this is one of the types in the standard repertoire of 2nd order ODEs, and it's really very simple to solve it (indeed very similar to the type "independent of y" (i.e. y''=f(x,y')).

Are the instructions that I posted in this HP-forum thread enough for you to implement this method?
Or would you need any further infos?

I've tried to create my own Xcas function for solving this type, but I saw that in Xcas I can't differentiate for the variable y' (i.e. diff(expr with y',y') doesn't work), and also substituting a new variable for y' (e.g. subst(expr with y',y'=u)) is not possible.
But I'm quite sure this can be done at the source level of Xcas.

Franz

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: deSolve enhancement

Message par parisse » sam. oct. 26, 2013 5:03 pm

I have now implemented this kind of equations. But it will not work very often, since there are 2 calls to desolve that must succeed. You will have to wait a little bit for binaries.
Thanks for the tips.

fhub
Messages : 35
Inscription : lun. juin 22, 2009 8:30 pm

Re: deSolve enhancement

Message par fhub » sam. oct. 26, 2013 5:25 pm

parisse a écrit :I have now implemented this kind of equations.
These are good news - many thanks! :-)
But it will not work very often, since there are 2 calls to desolve that must succeed.
Yes I know, I've tried a few such ODEs in Xcas manually.
Two well working examples are:
y''=y*y' and y''=y'^2/y

I have 2 further types in my ODE package which are also quite easy to solve -
the 1st one would be nice, the 2nd one is a bit more complicated (and not so important):

1) 'Liouville': y''=u(x)*y'+v(y)*y'^2 (looks a bit like the 1st order Bernoulli type)
If the ODE has exactly this form, then y' can immediately be calculated:
y'=c1*e^int(u(x),x)*e^int(v(y),y)
Then you can get y by one additional deSolve - or even write the solution directly in implicite form:
int(e^(-int(v(y),y)),y)=c1*int(e^int(u(x),x),x)+c2

2) 'exact': y''=u(x,y,y')/v(x,y,y')
There are 2 necessary (but rather unlikely) conditions to check (a few partial derivatives similar to 'exact 1st order ODE'), but this type happens really very seldom, so I doubt it would be worth to implement it (although it also would require just a few lines of code).

Franz

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: deSolve enhancement

Message par parisse » dim. oct. 27, 2013 7:26 am

Liouville should be ok now.

Répondre