nonlinear differential equation

hi group,

could anyone help me in solving the following nonlinear differential equation with mathematica:

s''[t] - a*s[t]^2 - b*s[t] - c = 0 s[0] = 0, s'[0] = v0

where a, b and c are contants.

is it possible to solve it?

thanks in advance

-u

Posted Via Usenet.com Premium Usenet Newsgroup Services

---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **

----------------------------------------------------------

formatting link

Reply to
prisculus
Loading thread data ...

"prisculus" a écrit dans le message de news: 421b6d2c$1_2@127.0.0.1...

Yes it is

write s''[t] = a*s[t]^2 + b*s[t] + c define a vector Y=(s, s') = (Y_1,Y_2) so Y'=(s', s'') so Y'_1 = Y_2 and Y'_2 = a*Y_1^2 + b*Y_1 + c

Now you have a vectorial relation like Y'=f(Y, t) and you can apply a runge-kutta method you can try this short C program if you have a compiler The function Y'=f(Y, t) is void F(double t,double Y[neq], double Yp[neq])

RQ : i'm french and so the comment are in french, good luck ;) #include

#include

#define neq 2 /*nombre d'equationsdu systeme à resoudre*/

#define Npasmax 5000 /*nombre de pas maximum*/

#define wo 10

#define nu 1

void menu ()

{

printf("*******************************************************************************\n");

printf("Programme de resolution de systemes de n equations differentielles\n");

printf("********************************************************************************\n");

printf("taper 1 pour entrer les donnees initiales\n");

printf("taper 2 pour realiser l'integration de la fonction F par la\n");

printf("methode de Runge Kutta d'ordre 4\n");

printf("taper 3 pour creer un fichier de sauvegarde des resultats \n");

printf("taper 4 pour quitter le programme\n");

printf("\n");

printf("Votre Choix : \n");

}

void saisie(double V[neq][Npasmax] ,double t[Npasmax],int *Nb )

{

int j;

int Nbpas;

for(j=0;jNpasmax) { Nbpas=Npasmax-1;}

printf("Saisissez le temps initial to\n");

scanf("%lf",&t[0]);

printf("Saisissez le temps final de calcul\n");

scanf("%lf",&t[Nbpas]);

*Nb=Nbpas; }

/*************procedures d'addition de deux vecteurs à n composantes*/

void som(double x[neq],double y[neq] , double z[neq])

{

int i;

for(i=0;i

Reply to
Zibletop

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.