Q: How to manipulate ..
- Subject: [mg3039] Q: How to manipulate ..
- From: sergio at scisun.sci.ccny.cuny.edu (Sergio Rojas)
- Date: 25 Jan 1996 05:35:41 -0600
- Approved: usenet@wri.com
- Distribution: local
- Newsgroups: wri.mathgroup
- Organization: City College Of New York - Science
- Sender: mj at wri.com
(* Hello fellows: ...................................................................... Question-1: Starting with: *) eq1 = HoldForm[ D[k[x]*D[f[x],x],x] - h[x] == 0 ] (* Mathematica answer: Out[85]= D[k[x] D[f[x], x], x] - h[x] == 0 *) (* Now one can try any form of f[x], like : *) u= g[x] + v[x] eq2= (eq1 /. {f[x]-> u, Derivative[1][f][x]->D[u,x]} ) (* Mathematica answer: Out[89]= D[k[x] D[g[x] + v[x], x], x] - h[x] == 0 *) (* How it can be written in the form: -h[x] + D[k[x]*D[g[x],x],x] + D[k[x]*D[v[x],x],x] == 0 Any suggestions ? *) (*.................................................................... Question-2: Suppose one have the following: *) eq1 = -h[x] + D[k[x]*D[g[x],x],x] + D[k[x]*D[v[x],x],x] == 0 (* Mathematica answer: Out[69]= -h[x] + g'[x] k'[x] + k'[x] v'[x] + k[x] g''[x] + k[x] v''[x] == 0 How it can be told to Mathematica, write the answer in the form: -h[x] + k'[x] (g'[x] + v'[x]) + k[x] (g''[x] + v''[x]) == 0 or in the form: -f[x] + k'[x] g'[x] + k[x] g''[x] + k'[x] v'[x] + k[x] v''[x] == 0 I tried : Simplify[eq1] FactorTerms[eq1] Collect[eq1,k[x]] Together[eq1] All of them failed. *) (*.................................................................... Question-3 Assume one can have the form: -f[x] + k'[x] (g'[x] + v'[x]) + k[x] (g''[x] + v''[x]) == 0 How it can be told to Mathematica, write it in the form: -h[x] + D[k[x]*D[g[x],x],x] + D[k[x]*D[v[x],x],x] == 0 or in the form: -h[x] + D[k[x]*D[(g[x] + v[x]),x],x] == 0 *) (*.................................................................... Question-4 How one can save the whole Mathematical session in a edit-able file? I know: Save["file",var1,var2,bla,bla,bla,..] and some variations Dump["file"] This can not be edited. *) That's all for now folks. Thanks very much for your attention. rojas E-mail: sergio at scisun.sci.ccny.cuny.edu *)