Internationa Journa of Pure and Appied Mathematics Voume 117 No. 14 2017, 167-174 ISSN: 1311-8080 (printed version); ISSN: 1314-3395 (on-ine version) ur: http://www.ijpam.eu Specia Issue ijpam.eu Soution of Wave Equation by the Method of Separation of Variabes Using the Foss Toos Maxima H.V.Geetha 1, T.G.Sudha 2 and Harshini Srinivas 3 1,2 Government Science Coege (Autonomous), Nrupathunga Road, Bangaore - 560 001. 1 infogeeth@gmai.com 2 tgsudha65@gmai.com 3 Department of Computer Science Engineering, BNMIT, Bangaore - 560 070. 3 harshusrinivas97@gmai.com Abstract In this paper we woud ike to sove one dimensiona Wave Equation 2 u t 2 = c 2 2 u under the given boundary conditions u(0, t) = 0, u(, t) = 0, x > 0 x2 u and u(x, 0) = f(x), (x, 0) = g(x), t by the method of separation of t variabes using FOSS toos Maxima. Key words: ki, ode2, fourie, ratsubst. 1 Introduction Maxima: Maxima is a arge computer program designed for the manipuation of agebraic expressions. You can use Maxima for manipuation of agebraic expressions invoving constants, variabes, and functions. It can differentiate, integrate, take imits, sove equations, factor poynomias, expand functions in power series, sove differentia equations in cosed form, and perform many other operations. It aso has a programming anguage that you can use to extend Maximas capabiities.[4] 167
Internationa Journa of Pure and Appied Mathematics Specia Issue 2 Wave Equation The wave equation is an important second-order inear hyperboic partia differentia equation for the description of waves as they occur in cassica physics such as sound waves, ight waves and water waves. It arises in fieds ike acoustics, eectromagnetic, and fuid dynamics.[7] The wave equation in one space dimension can be written as foows: 2 u t = 2 u 2 c2 x 2 This equation is typicay described as having ony one space dimension x, because the ony other independent variabe is the time t. Nevertheess, the dependent variabe u may represent a second space dimension, if, for exampe, the dispacement u takes pace in y-direction, as in the case of a string that is ocated in the x y pane. The one dimensiona wave equation is given by 2 u t 2 conditions u(0, t) = 0, u(, t) = 0, x > 0 and u(x, 0) = f(x), u Soution: The Wave equation is given by The soution of equation is of the form Substituting equation (2) in equation (1), we get = 2 u c2 under the boundary x2 (x, 0) = g(x), t. t 2 u t = 2 u 2 c2 (1) x 2 u(x, t) = X(x) T (t) (2) T (t) c 2 T (t) = X (x) X(x) = λ2 (3) The soution of equation (3) is the soution of the differentia equation T (t) + λ 2 c 2 T (t) = 0 and X (x) + λ 2 X(x) = 0 If λ > 0, then the soution of the above equation is given by T (t) = c 1 cos(λct) + c 2 sin(λct) and X(x) = c 3 cos(λx) + c 4 sin(λx) The soution of equation (1) is given by u(x, t) = (c 1 cos(λct) + c 2 sin(λct))(c 3 cos(λx) + c 4 sin(λx)) (4) Appying the boundary condition u(0, t) = 0, u(1, t) = 0 From equation (4), we get Then equation (4) reduces to u(x, t) = c 3 = 0, λ = nπ ( ( nπct ) c 1 cos where n = 0, 1, 2, 3,... ( nπct )) ( nπx ) + c 2 sin c 4 sin 168
Internationa Journa of Pure and Appied Mathematics Specia Issue ( ( nπct ) u(x, t) = A n cos ( nπct )) ( nπx ) + B n sin sin For each vaue of n equation (5) is the soution. By Superposition principe the sum of a these soution is aso a soution u(x, t) = n=1 ( ( nπct ) A n cos Appying the initia conditions to equation (6), then and A n = 2 B n = 2 nπc 1 0 1 0 ( nπct )) ( nπx ) + B n sin sin (5) (6) ( nπx ) f(x) sin dx (7) ( nπx ) g(x) sin dx (8) Substituting equation (7) & equation (8) in equation (6) we get the required soution. 3 Agorithm Step 1: Start Step 2: Input u(x, t) X(x) T (t), x, t > 0, c > 0, λ > 0, n > 0, > 0 Step 3: Substitute Step 2 in X (x) X(x) Step 4: Input LHS of Step 3 to λ 2. Step 5: Sove Step 4. Step 6: Input RHS of Step 3 to λ 2. Step 7: Sove Step 6. T (t) c T (t) Step 8: Repace %k 1 to %k 3 and %k 2 to %k 4 in Step 7. Step 9: Input X(0) 0 in Step 5. [Appying Boundary Condition] Step 10: Input X() 0 in Step 5. [Appying Boundary Condition] Step 11: Substitute Step 10 in Step 8 and Step 5. Step 12: Substitute Step 11 in Step 2. Step 13: Simpify Step 12. Step 14: Input A[n] %k 1 %k 3 and B[n] %k 1 %k 4 [ 2 ( ( nπx ) ) ] Step 15: Sove A[n] as () integrate f(x) sin, x, 0, 169
Internationa Journa of Pure and Appied Mathematics Specia Issue Step 16: Sove B[n] [ as 2 ( ( nπx ) ) ] (nπc) integrate g(x) sin, x, 0, Step 17: Put Step 15 and Step 16 in Step 13. Step 18: Sove for summation n 1 to of Step 17. Step 19: Output Step 18. 4 Probem A tighty stretched string with fixed end points x = 0 and x = 1 is initiay at rest in its equiibrium position with density is 1mass unit/voume and tension is 1 unit. if it is set vibrating giving each point a veocity x(1 x), find its dispacement function. The vibration of the string are governed by one dimensiona wave equation 2 u t = 2 u under the boundary conditions 2 x2 i) u(0, t) = 0, u(, t) = 0, t 0 ii) u(x, 0) = 0, u t (x, 0) = x x2 for 0 < x < 1 5 Maxima Program: ki(a) $ oad( fourie ) $ oad( rats ) $ g(x, t) := diff(u(x, t), t, 2) = c diff(u(x, t), x, 2); assume (n > 0, c > 0, x > 0, t > 0, λ > 0, > 0) $ c : 1 $ : $ u(x, t) := X(x) T (t) $ F (x, t) := g(x, t)/(c u(x, t)) $ x1 : ode2(rhs(f (x, t)) = ambda 2, X(x), x) $ define (X(x), rhs(x1)) $ t2 : ode2(hs(f (x, t)) = ambda 2, T (t), t) $ t1 : subst([%k1 = %k3, %k2 = %k4], %) $ t2 : define(t (t), rhs(t1)) $ disp( appying the condition X(0)=0 ) $ if at ( X(x), x = 0) =%k2 then %k2 : 0 ese %k1 : 0 $ disp( X(x)=,X(x)) $ 170
Internationa Journa of Pure and Appied Mathematics Specia Issue if at(x(x),x=)#0 then ambda:n*%pi/ ese ambda:0 $ disp( X(x)=,X(x)) $ u1:ratsimp(u(x,t)) $ f(x):=0 $ 2/*integrate(f(x)*sin(n*%pi*x/),x,0,) $ B[n]:foursimp(%); g(x) := x x 2 ; 2/(n*%pi)*integrate(g(x)*sin(n*%pi*x/),x,0,) $ A[n]:foursimp(%); u2:ratsubst([%k1*%k3=a[n], %k1*%k4=b[n]],u1) $ u3:sum(u2,n,1,inf) $ disp( soution is u(x,t)=,u3) $ Output: Whie the soution u(x, t) is very compicated, in fact each term is simpe. For each fixed t, 8 sin( x) cos(t) is just a constant mutipe of sin( x ), as x runs from 0 to π π. π Here are the graphs, at fixed t. 171
Internationa Journa of Pure and Appied Mathematics Specia Issue For each fixed x, the 8 sin( x ) cos(t) is just a constant times cos(t). As t increases π the argument of cos(t) increases by one haf cyce, since c =, to increase the frequency of osciation of a string we need to increase the tension or decrease the density or shorten the ength of the string. T ρ 6 Concusion The soution obtained manuay are exacty same as the soutions obtaione by Maxima program. 7 Authors Contributions First two authors worked together for the preparation of the manuscript and both take fu responsibiity for the content of the paper. However second author typed the paper and as read and approved the fina manuscript. The third author gave the Agorithm to the Maxima program. 172
Internationa Journa of Pure and Appied Mathematics Specia Issue 8 Confict of Interests The authors hereby decares that there are no issues regarding the pubication of this paper. References [1] R.K.Gupta, Partia Differentia Equations [2] Shankar Rao.K, Partia Differentia Equation [3] Giberto. E.Urroz, Introduction to Maxima [4] Gurpreet Singh Tuteja, Practica Mathematics [5] Gottfried, Programming with C [6] Maxima Software. [7] Mattew J Hancock, The 1-D Wave equation 18.303 Linear Partia Differentia Equation (2006) [8] E D Rainvie and P E Bedient, Eementary Differentia Equation [9] S L Ross, Differentia Equation [3 rd edition] 173
174