solving a system of equations involving numerical integration
- To: mathgroup at smc.vnet.net
- Subject: [mg42562] solving a system of equations involving numerical integration
- From: Vladimira Ilieva <vilieva at dreman.com>
- Date: Tue, 15 Jul 2003 02:54:17 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I am trying to find the solution to a system of two equations in two unknowns. The difficulty comes from the fact that the two equations involve numerical integration. Could you please let me know what you think about the code above? I have been running this code for hours with no response from Mathematica yet. Thanks! Clear[f]; Clear[g]; Clear[a]; Clear[b]; f[a_?NumericQ, b_?NumericQ]:= With[{NIntegrate[(1/(100+5x+5y)^0.5)*[ExponenitalE]^(((Log[x] - Log[a] - 0.03)^2/2) - ((Log[y] - Log[b] - 0.02)^2/2))/(2*Pi*y) , {x, 0.001, ∞}, {y, 0.001, ∞}, Method -> Trapezoidal, MinRecursion -> 3, MaxRecursion -> 10]} /; ! (a == 0) || ! (b == 0)]; g[a_?NumericQ, b_NumericQ] := With[{NIntegrate[(1/(100 + 5x + 5y)^0.5)*[ExponentialE]^(((Log[x] - Log[a] - 0.03)^2/2) - ((Log[y] - Log[b] - 0.02)^2/2))/(2*Pi*x), {x, 0.001, ∞}, {y, 0.001, ∞}, Method -> Trapezoidal, MinRecursion -> 3, MaxRecursion -> 10]} /; ! (a == 0) || ! (b == 0)]; FindRoot[{a == 0.95*f[a, b]*(100 + 5*a + 5*b)^0.5 , b == 0.95*g[a, b]*(100 + 5*a + 5*b)^0.5}, {a, 1}, {b, 1}]