1. goddamn equasions
- Posted by =?iso-8859-2?B?qWtvZGE=?= <tone.skoda at SIOL.NET> Sep 13, 2000
- 461 views
- Last edited Sep 14, 2000
------=_NextPart_000_0007_01C01DC5.16E5DDE0 charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable how do i solve this? with matrix? you have 4 unknown variables and 4 equasions. i need to know values of a,b,c,d. #e is 2.71 or something like that. ^ means power (3^2=3D9) 135=3Da*1000^b*#e^(c*(0.2))*(0.1)^d 360=3Da*950^b*#e^(c*(0.4))*1^d 765=3Da*900^b*#e^(c*(0.6))*5^d 130=3Da*850^b*#e^(c*(0.2))*(0.1)^d i tried it with Derive but it solves a shit is there any other program i can get that will solve it for me? here is verions of four equasions in C: 135=3Da*pow(1000,b)*exp(c*(0.2))*pow(0.1,d) 360=3Da*pow(950,b)*exp(c*(0.4))*pow(1,d) 765=3Da*pow(900,b)*exp(c*(0.6))*pow(5,d) 130=3Da*pow(850,b)*exp(c*(0.2))*pow(0.1,d) and in BASIC: 135=3Da*1000^b*EXP(c*(0.2))*(0.1)^d 360=3Da*950^b*EXP(c*(0.4))*1^d 765=3Da*900^b*EXP(c*(0.6))*5^d 130=3Da*850^b*EXP(c*(0.2))*(0.1)^d and in FORTRAN: 135=3Da*1000**b*EXP(c*(0.2))*(0.1)**d 360=3Da*950**b*EXP(c*(0.4))*1**d 765=3Da*900**b*EXP(c*(0.6))*5**d 130=3Da*850**b*EXP(c*(0.2))*(0.1)**d and in PASCAL: 135=3Da*POW(1000,b)*EXP(c*(0.2))*POW(0.1,d) 360=3Da*POW(950,b)*EXP(c*(0.4))*POW(1,d) 765=3Da*POW(900,b)*EXP(c*(0.6))*POW(5,d) 130=3Da*POW(850,b)*EXP(c*(0.2))*POW(0.1,d) ok, enough. ------=_NextPart_000_0007_01C01DC5.16E5DDE0 charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-2" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DVerdana size=3D2>how do i solve this? with = matrix?</FONT></DIV> <DIV><FONT face=3DVerdana size=3D2>you have 4 unknown variables = and 4=20 equasions.</FONT></DIV> <DIV><FONT face=3DVerdana size=3D2>i need to know values of = a,b,c,d.</FONT></DIV> <DIV><FONT face=3DVerdana size=3D2>#e is 2.71 or something like = that.</FONT></DIV> <DIV><FONT face=3DVerdana size=3D2>^ means power (3^2=3D9)</FONT></DIV> <DIV><FONT face=3DVerdana size=3D2></FONT> </DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2>i tried it with Derive but it solves = a=20 shit</FONT></DIV> <DIV><FONT face=3DVerdana size=3D2>is there any other program i can get = that will=20 solve it for me?</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2>here is verions of four equasions in=20 C:</FONT></DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2>and in BASIC:</FONT></DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV><FONT face=3DVerdana = <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2>and in FORTRAN:</FONT></DIV> <DIV><FONT face=3DVerdana size=3D2> =20 <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2> =20 360=3Da*950**b*EXP(c*(0.4))*1**d</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2> =20 765=3Da*900**b*EXP(c*(0.6))*5**d</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2> =20 130=3Da*850**b*EXP(c*(0.2))*(0.1)**d</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2>and in PASCAL:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV><FONT face=3DVerdana=20 <DIV> </DIV> <DIV><FONT face=3DVerdana size=3D2></FONT> </DIV> <DIV><FONT face=3DVerdana size=3D2>ok, = ------=_NextPart_000_0007_01C01DC5.16E5DDE0--
2. Re: goddamn equasions
- Posted by Al Getz <xaxo at AOL.COM> Sep 13, 2000
- 437 views
koda wrote: >> solve: 135=a*1000^b*#e^(c*(0.2))*(0.1)^d 360=a*950^b*#e^(c*(0.4))*1^d 765=a*900^b*#e^(c*(0.6))*5^d 130=a*850^b*#e^(c*(0.2))*(0.1)^d << I was working on a Euphoria program to solve non lin's but haven't gotten back to it in a while. i hope to take a break from windows programming soon and get back to it. Offhand, this looks unsolvable in general because of all the multiplys. Are you sure there are not any additions such as: 135 = a*1000^b + e^(c*(0.2)) + (0.1)^d ??? These can often be solved to some degree using non linear equation solving methods. Can't solve them using linear algebra in general. Also, still need n equations to solve for n variables in general. --Al
3. Re: goddamn equasions
- Posted by Rolf Schroeder <r.schr at T-ONLINE.DE> Sep 14, 2000
- 481 views
=A9koda wrote: > > Part 1.1 Type: Plain Text (text/plain) > Encoding: quoted-printable 135=3Da*1000^b*#e^(c*(0.2))*(0.1)^d 360=3Da*950^b*#e^(c*(0.4))*1^d 765=3Da*900^b*#e^(c*(0.6))*5^d 130=3Da*850^b*#e^(c*(0.2))*(0.1)^d First, use the nat. Logarithm on all eqs. for they are all multipicativ. That wil make ti possible to solve a linear System with Derive. I'm right now in a hurry. Rolf
4. Re: goddamn equasions
- Posted by Al Getz <xaxo at AOL.COM> Sep 14, 2000
- 439 views
©koda wrote: >> 135=a*1000^b*#e^(c*(0.2))*(0.1)^d 360=a*950^b*#e^(c*(0.4))*1^d 765=a*900^b*#e^(c*(0.6))*5^d 130=a*850^b*#e^(c*(0.2))*(0.1)^d << I'm assuming he meant: let n be subscripts: {1,2,3,...,N=number of equations} and let An,Bn,Cn,Dn be subscripted constants: {A1,A2,..B1,B2..etc} and let a,b,c,d be variables, then the system: An = a*Bn^b * e^(c*Cn) * Dn^d isn't solvable. Changing the form to a commonly encountered form by insert additions however and its a different story: An = a*Bn^b + e^(c*Cn) + Dn^d This system can often be solved using non linear equation solving methods. --Al
5. Re: goddamn equasions
- Posted by =?iso-8859-2?B?qWtvZGE=?= <tone.skoda at SIOL.NET> Sep 14, 2000
- 447 views
- Last edited Sep 15, 2000
Al Getz wrote: > Are you sure there are not any additions such as: > 135 = a*1000^b + e^(c*(0.2)) + (0.1)^d ??? No, my original equasion is right. > Also, still need n equations to solve for n variables in general. Yes, that's what i know also and so it must be solvable. Thanks to everybody who helped. Matthew Lewis solved it with Excel functions, don't ask me how, cause it's nothing clear to me. Anybody interseted, he found this: a=45.27 b=.232 c=1.203 d=.327
6. Re: goddamn equasions
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Sep 14, 2000
- 452 views
Skoda, Just to clear one thing up: it's not that you need n equations to be able to solve a set of equations with n variables , it's that you need n INDEPENDENT equations. Graphical= ly that means the equations give n DIFFERENT lines (or curves), all intersecting at one (or more) common point(s). x=3D y + 1 2x =3D 2y + 2 are NOT 2 independent equations. Dan ----- Original Message ----- From: "=A9koda" <tone.skoda at SIOL.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Thursday, September 14, 2000 12:36 PM Subject: Re: goddamn equasions > Al Getz wrote: > > > Are you sure there are not any additions such as: > > 135 =3D a*1000^b + e^(c*(0.2)) + (0.1)^d ??? > > No, my original equasion is right. > > > Also, still need n equations to solve for n variables in general. > > Yes, that's what i know also and so it must be solvable. > > Thanks to everybody who helped. > Matthew Lewis solved it with Excel functions, don't ask me how, cause i= t's > nothing clear to me. > Anybody interseted, he found this: > > a=3D45.27 > b=3D.232 > c=3D1.203 > d=3D.327
7. Re: goddamn equasions
- Posted by Al Getz <xaxo at AOL.COM> Sep 15, 2000
- 452 views
Koda, Sorry, i didnt realize you were asking such a trivial question. I had thought you stuck in any old constants and such just to illustrate the nature of the question you had, especially since you never see the number 1 raised to a power in any real life situation. You happen to be lucky here, the system you are trying to solve looks like a textbook example, as it can be shown to have only one independent variable, a very rare occurance in real life. It can be solved using simple algebra and natural logarithms. The specific system: [1] 135= a * 1000^b * e^(.2c) * (0.1)^d [2] 360= a * 950^b * e^(.4c) * 1^d [3] 765= a * 900^b * e^(.6c) * 5^d [4] 130= a * 850^b * e^(.2c) * (0.1)^d together with the relationship: A^b=e^(B*b) can be converted into the system: 135= a * e^(B1*b + C1*c + D1*d) 360= a * e^(B2*b + 2*C1*c + 0 ) 765= a * e^(B3*b + 3*C1*c + D3*d) 130= a * e^(B4*b + C1*c + D1*d) where: B1=ln(1000) B2=ln(950) B3=ln(900) B4=ln(850) C1=.2 D1=ln(.1) D3=ln(5) Now divide all by a and taking the log of both sides leads to: [5] ln(135/a)= B1*b + C1*c + D1*d [6] ln(360/a)= B2*b + 2*C1*c [7] ln(765/a)= B3*b + 3*C1*c + D3*d [8] ln(130/a)= B4*b + C1*c + D1*d Now subtracting eq[5]-eq[8] and solving for b in terms of a yields: [9] b = (ln(135/a)-ln(130/a))/(B1-B4) Now substitute b into eq[6] and solve for c in terms of a: [10] c = (ln(360/a)-B2*b)/2/C1 Now substitute b and c into eq[7] and solve for d in terms of a: [11] d = (ln(765/a)- B3*b - 3*C1*c)/D3 This shows "a" is the only independent variable in that system. Now let variable "a" range in value numerically, solve for b,c,d in terms of this a, then substitute into eq[1] and calculate the right side numerically. When the left side equals the right side you have the solution to a,b,c and d. Since you have only one independent variable, you can also use Newtons method for roots for that last step: rearrange eq[1] and let: f(x)= 135 - a * 1000^b * e^(.2c) * (0.1)^d where f(x) is an error function of x created by subtracting the left side of eq[1] from the right side of eq[1], and letting a = x and calculating b,c,d from eq[9], eq[10], eq[11]. Now choosing x such that f(x)=0 and we have a solution. To help arrive at this x, pick a guess, say, 20, then: first pass: a = x - f(x)/f'(x) (Newtons) = 20 - (-25.96575)/(1.733109) = 34.98218 second pass: a = x - f(x)/f'(x) = 34.98218 - ( -7.707)/(0.878447) = 43.75578 third pass: a = x - f(x)/f'(x) = 43.75578 - ( -.99323)/(.66925) = 45.23984 fourth pass: a = x - f(x)/f'(x) = 45.23984 - ( -0.0199605)/(.6426765) = 45.27090 fifth pass: a = x - f(x)/f'(x) = 45.27090 - ( -8E-6)/(.642) = 45.270915 after which var a doesnt change much because the second term approaches zero. On my calculator i came up with the following values: a=45.270915 b=0.232221121 c=1.20305991 d=0.326645325 f'(x) is the numerical derivative taken at x, and can be approx: f'(x)= [ f(x)- f(x + delta) ]/(delta + delta) where delta is typically set equal to some small value, like 0.0001. Its sometimes necessary to analyze the equations using calculus to see if more solutions exist. Oh and yes, the n equations have to be independent as dan was saying too. (thanks dan) Have fun with it, --Al
8. Re: goddamn equasions
- Posted by Al Getz <xaxo at AOL.COM> Sep 15, 2000
- 438 views
Koda, Sorry in my last post i quickly typed in the wrong approximation to the first derivative. The correct approximation to the first derivative is: f'(x)= [ f(x + delta)- f(x) ]/(delta + delta) where delta is typically set equal to some small value, such as 0.0001.
9. Re: goddamn equasions
- Posted by =?iso-8859-2?B?qWtvZGE=?= <tone.skoda at SIOL.NET> Sep 15, 2000
- 437 views
Thanks Al Getz . > Oh and yes, the n equations have to be independent as dan was saying too. > (thanks dan) I knew that also... > Have fun with it, > --Al I'll try...
10. Re: goddamn equasions
- Posted by Al Getz <xaxo at AOL.COM> Sep 15, 2000
- 439 views
koda, One additional point with that special system: [5] ln(135/a)= B1*b + C1*c + D1*d [6] ln(360/a)= B2*b + 2*C1*c [7] ln(765/a)= B3*b + 3*C1*c + D3*d [8] ln(130/a)= B4*b + C1*c + D1*d with the help of the relationship: ln(A/B)=ln(A)-ln(B) you can convert to an "almost" total linear system: ln(135)= B1*b + C1*c + D1*d + ln(a) ln(360)= B2*b + 2*C1*c + ln(a) ln(765)= B3*b + 3*C1*c + D3*d + ln(a) ln(130)= B4*b + C1*c + D1*d + ln(a) and solve by the usual method of simultaneous solutions: x = M^(-1) * v { x,v vectors, M square matrix } Then: a = e^(ln (a) ) constants repeated here: B1=ln(1000) B2=ln(950) B3=ln(900) B4=ln(850) C1=.2 D1=ln(.1) D3=ln(5) Usually you need to use numerical analysis with these types of equations. This was a very special case. --Al