An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130710/9ea486a8/attachment.pl>
Recherche de fonction
3 messages · Raphaëlle Carraud, Berend Hasselman
On 10-07-2013, at 16:21, Rapha?lle Carraud <raphaelle.carraud at oc-metalchem.com> wrote:
Bonjour, Je souhaite r?soudre le couple d'?quation diff?rentielles suivant : 0 = -dA + dB + 2*dC - 2*r1 - 2*r5 0 = dA + dD + r1 + r4 0 = K2 - C/B^2 0 = K3 - D/(A*B) 0 = r5 + 2*r4 - dE 0 = r5 -dI 0 = -r5 - r4 - dG 0 = -r1/2 - dH en ayant connaissance des valeurs initiales de dA, dB, dC, dE, dI, dG, dH, r1, r2, r4, r5, K2, K3, A, B, C et D.
If all initial values are known then plugging the values in the system will give 0 or not 0. There is nothing to "solve".
J'ai essay? plusieurs fonctions mais comme je ne peux pas lui faire calculer une des d?riv?e de laquelle d?coulerait les autre, il n'arrive pas ? me fournir la solution. Je n'ai pas vu d'exemple qui pourrai s'assimiler ? celui-ci dans la documentation.
You will have to redo your query in English. Questions in French won't receive many replies. My French is rudimentary but I'll try. You have 8 equations and 17 variables. So how do you propose to "solve" the system? Assuming that the d? variables are differentials and that you want to solve for those: you have 7 of these and 8 equations. So how to solve? But the third and fourth equations have no d? variables, so the may even be inconsistent given the values of K2, K3, C, B, A, D. So you have 6 equations for 7 d? variables. So how do you propose to solve for the d? variables? Finally your system seems to be linear in the d? variables. You would be able to use R's solve() if you can get your system to be a square system. If your system is not square and underdetermined then you can use a Moore Penrose inverse to get a minimum norm solution (http://en.wikipedia.org/wiki/Moore?Penrose_pseudoinverse#Minimum-norm_solution_to_a_linear_system). package MASS provides a function ginv(). Berend
Est-il possible de r?soudre ce probl?me sur R ? Merci Cordialement, Rapha?lle Carraud [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On 10-07-2013, at 20:42, Berend Hasselman <bhh at xs4all.nl> wrote:
On 10-07-2013, at 16:21, Rapha?lle Carraud <raphaelle.carraud at oc-metalchem.com> wrote:
Bonjour, Je souhaite r?soudre le couple d'?quation diff?rentielles suivant : 0 = -dA + dB + 2*dC - 2*r1 - 2*r5 0 = dA + dD + r1 + r4 0 = K2 - C/B^2 0 = K3 - D/(A*B) 0 = r5 + 2*r4 - dE 0 = r5 -dI 0 = -r5 - r4 - dG 0 = -r1/2 - dH en ayant connaissance des valeurs initiales de dA, dB, dC, dE, dI, dG, dH, r1, r2, r4, r5, K2, K3, A, B, C et D.
If all initial values are known then plugging the values in the system will give 0 or not 0. There is nothing to "solve".
J'ai essay? plusieurs fonctions mais comme je ne peux pas lui faire calculer une des d?riv?e de laquelle d?coulerait les autre, il n'arrive pas ? me fournir la solution. Je n'ai pas vu d'exemple qui pourrai s'assimiler ? celui-ci dans la documentation.
You will have to redo your query in English. Questions in French won't receive many replies. My French is rudimentary but I'll try. You have 8 equations and 17 variables. So how do you propose to "solve" the system? Assuming that the d? variables are differentials and that you want to solve for those: you have 7 of these and 8 equations. So how to solve? But the third and fourth equations have no d? variables, so the may even be inconsistent given the values of K2, K3, C, B, A, D. So you have 6 equations for 7 d? variables. So how do you propose to solve for the d? variables? Finally your system seems to be linear in the d? variables. You would be able to use R's solve() if you can get your system to be a square system. If your system is not square and underdetermined then you can use a Moore Penrose inverse to get a minimum norm solution (http://en.wikipedia.org/wiki/Moore?Penrose_pseudoinverse#Minimum-norm_solution_to_a_linear_system). package MASS provides a function ginv().
And to make matters simple: since your lefthand sides are 0 the minimum norm solution of your system is 0. Berend