Re: Equation problem
- To: mathgroup at smc.vnet.net
- Subject: [mg42213] Re: Equation problem
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Tue, 24 Jun 2003 01:26:59 -0400 (EDT)
- References: <bd6iuo$ca4$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Use FindRoot Since n is not an integer, the upper limit of the summation should probably include a Floor r1=0.0298; r2=0.0335; n1=Floor[Abs[(r2-r1)/T]]; eqn1 = 2*Pi*Sum[r1+i*T,{i,0,n1}]==10 2*Pi*((1/2)*T*Floor[0.003700000000000002/Abs[T]]* (Floor[0.003700000000000002/Abs[T]] + 1) + 0.0298*(Floor[0.003700000000000002/Abs[T]] + 1)) == 10 soln1 = FindRoot[eqn1, {T,{.00006,.0001}}] FindRoot::frmp: Machine precision is insufficient to achieve the accuracy 1. x 10^-6 {T -> 0.00007400853629942335} n1/.soln1 49 Plot[Evaluate[eqn1[[1]]-eqn1[[2]]], {T,0.00007,.00008}, PlotStyle->RGBColor[1, 0, 0]]; Allowing the Sum to evaluate with a non-integer upper limit n2=Abs[(r2-r1)/T]; eqn2 = 2*Pi*Sum[r1+i*T,{i,0,n2}]==10 2*Pi*(0.0298*(1 + 0.003700000000000002/Abs[T]) + (0.001850000000000001*T*(1.*Abs[T] + 0.0037000000000000023))/Abs[T]^2) == 10 soln2 = FindRoot[eqn2, {T,{.00006,.0001}}] {T -> 0.0000750721470872797} n2/.soln2 49.28592219026773 Plot[Evaluate[eqn2[[1]]-eqn2[[2]]], {T,0.00007,.00008}, PlotStyle->RGBColor[1, 0, 0]]; Bob Hanlon In article <bd6iuo$ca4$1 at smc.vnet.net>, "Dan" <gentlemanjack at casino.com> wrote: << Subject: Equation problem From: "Dan" <gentlemanjack at casino.com> To: mathgroup at smc.vnet.net Date: Mon, 23 Jun 2003 09:57:44 +0000 (UTC) I need to solve the system of equations (in Mathematica notation): r1 == 0.0298 r2 == 0.0335 n == Abs[(r2-r1)/T] 2*Pi*Sum[r1+i*T, {i,0,n}] == 10 T>0 I tried (ignoring T>0) to use NSolve, which didn't work. I guessed the problem is that the summation limit depends on T which is also a part of the summand. However, Mathematica succefully solves the simpler Sum[n, {i, 0, n}] == 2. What is the essence of the problem? How can I solve it? >><BR><BR>