0
|
5861 Views
|
18 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Possible mistake in my Mathematica syntax for 4 springs and 3 masses

Posted 10 years ago
 DSolve[{-2*x1 + x2 == x1'', -2*x2 + x1 == x2'',   x1[0] == -1, x2[0] == 2, x1'[0] == 0, x2'[0] == 0}, {x1, x2}, t] produces a short and elegant result but when I extend the syntax to cover three masses and four springs, I get reams of complexity. I must be doing something wrong. This is the syntax: DSolve[{-2*x1 + x2 == x1'', -2*x2 + x3 + x1 ==    x2'', -2*x3 + x2 == x3'', x1[0] == -1, x2[0] == 2,   x3[0] == -1, x1'[0] == 0, x2'[0] == 0, x3'[0] == 0}, {x1, x2, x3},t] Have I made a mistake? Thanks for any help.
18 Replies
Sort By:
Posted 10 years ago
Posted 10 years ago
 Once again you've guided me in the right direction. I can now see that the problem lies in the difference between the xls and xlsx file extensions. The xlsx version of 3+4i introduced an asterisk when imported into Mathematica, but when saved in the 97-2003 version, the transfer was clean. What I am now trying to do is find a way of OPENING an xls file in the 97-2003 format. It seems to automatically convert to 2007 format (xlsx). (I have tried exporting 3+4I to a file with an xlsx extension, but it won't do it.)
Posted 10 years ago
 Naughty me! I was so delighted to see the importation of the 3+4i without an asterisk that I failed to notice that the "i" is lower case. So it DIDN'T import the file as a number but as text (inside 3 lots of curly brackets). By the way, when exporting this number to Excel, it makes no difference whether an asterisk is included or not; it's there when I open the file in Excel, and when I try to do anything with it, I get a #NUM! So I'm no further forward.
Posted 10 years ago
 "If you are expecting to Export 3 from Mathematica to Excel and get the complex number 3+0*I (using Excel's notation) when it gets there then I suspect this is going to be a completely different collection of problems to overcome." Too right! I spent hours yesterday trying to find a way of getting a list of lists of two elements, and failed. Suitable penance for my earlier sloppiness, I think. However, exploring problems like these is a good way of getting to understand how programs work, and eventually I did meet with success in my main problem. Using your table to export to an xls file, I then imported that file back into Mathematica. I replaced the asterisk+capital I with lower case i, defined a table with the result, and re-exported to xls. I'm very grateful for all the tips and advice you have given me. Best wishes, Robert PS I wish this forum software were a bit easier to use.
Posted 10 years ago
 Perhaps I made an error, so I just opened the data.xls file, it opened, the column of numbers seems to beexactly the column of numbers that were in the table inside Mathematica.If there is still a problem then please define "usable data in Excel" while imagining that the person youare writing to has no idea what you are thinking or what you need to accomplish, has not been lookingover your shoulder for days or weeks and can only guess what you want based on the meaning of eachword in the message you post. If you need something in a precise format then please describe exactlywhat that format is.Thank you
Posted 10 years ago
 I want to be able to use the transferred data as complex numbers, but Excel 2007 doesn't seem to recognize them as such. The transferred numbers don't have the same format as ordinary complex numbers. For example, they have no spaces. I did a find/replace for the spaces, and that's fine. But when I try to do the same with the asterisks, the entire number disappears completely, both real and imaginary parts of it. It is not clear to me what the asterisks actually signify. The second one might just be multiplication, as usual; i.e. *i, but what about the first one? Multiplication doesn't make much sense there.
Posted 10 years ago
 Perhaps this? In[1]:= v = FullSimplify[(Cos[6.59575411272515 t] - (0. + 1. I) Sin[6.59575411272515 t])  (0.13875529245509138 Cos[4.663902460147014 t] + 0.06249999999999997 Cos[4.863703305156273 t] -  0.6666666666666666 Cos[5.1815405503520555 t] - 0.3125 Cos[5.59575411272515 t] -   0.22208862578842473 Cos[6.078116022520109 t] - 0.22208862578842473 Cos[7.113392202930192 t] -   0.3125 Cos[7.59575411272515 t] - 0.6666666666666666 Cos[8.009967675098245 t] +   0.06249999999999997 Cos[8.327804920294028 t] + 0.13875529245509138 Cos[8.527605765303287 t] +  (0. + 0.13875529245509138 I) Sin[4.663902460147014 t] + (0. + 0.06249999999999997 I)  Sin[4.863703305156273 t] - (0. + 0.6666666666666666 I) Sin[5.1815405503520555 t] -  (0. + 0.3125 I) Sin[5.59575411272515 t] - (0. + 0.22208862578842473 I) Sin[6.078116022520109 t] - (0. + 0.22208862578842473 I) Sin[7.113392202930192 t] - (0. + 0.3125 I) Sin[7.59575411272515 t] - (0. + 0.6666666666666666 I) Sin[8.009967675098245 t] + (0. + 0.06249999999999997 I) Sin[8.327804920294028 t] + (0. + 0.13875529245509138 I) Sin[8.527605765303287 t])]; d = Table[v, {t, 0, 4 Pi, Pi/16}]; Export["data.xls", d]Out[2]= "data.xls"
Posted 10 years ago
 Unfortunately this doesn't seem to produce usable data in Excel. I'm exploring various options and hopefully one of them will work.
Posted 10 years ago
 I extended the series to five masses, and the result gets very complicated. I would like to export the data to Excel. It's easy to do with a spreadsheet or tabular data, but not so easy with the following. How can I do this? (Cos[6.59575411272515 t] - (0. + 1. I) Sin[     6.59575411272515 t]) (0.13875529245509138 Cos[     4.663902460147014 t] +    0.06249999999999997 Cos[4.863703305156273 t] -    0.6666666666666666 Cos[5.1815405503520555 t] -    0.3125 Cos[5.59575411272515 t] -    0.22208862578842473 Cos[6.078116022520109 t] -    0.22208862578842473 Cos[7.113392202930192 t] -    0.3125 Cos[7.59575411272515 t] -    0.6666666666666666 Cos[8.009967675098245 t] +    0.06249999999999997 Cos[8.327804920294028 t] +    0.13875529245509138 Cos[     8.527605765303287 t] + (0. + 0.13875529245509138 I) Sin[     4.663902460147014 t] + (0. + 0.06249999999999997 I) Sin[     4.863703305156273 t] - (0. + 0.6666666666666666 I) Sin[     5.1815405503520555 t] - (0. + 0.3125 I) Sin[     5.59575411272515 t] - (0. + 0.22208862578842473 I) Sin[     6.078116022520109 t] - (0. + 0.22208862578842473 I) Sin[     7.113392202930192 t] - (0. + 0.3125 I) Sin[     7.59575411272515 t] - (0. + 0.6666666666666666 I) Sin[     8.009967675098245 t] + (0. + 0.06249999999999997 I) Sin[     8.327804920294028 t] + (0. + 0.13875529245509138 I) Sin[     8.527605765303287 t])
Posted 10 years ago
 I apologize for not being clear. There is often a severe problem of the lack of a common language between those trying to ask and those trying to answer questions here.Now I fought and fought and fought the forum software to try to produce a simple compact code example showing you exactly what I meant.I failed.Here is a not repaired not-compact not-hundreds of extra blank lines deleted not-short lines joined example showing you exactly the steps I took.  In[1]:= DSolve[{-2*x1[t] + x2[t] ==        x1''[t], -2*x2[t] + x3[t] + x1[t] == x2''[t], -2*x3[t] + x2[t] ==        x3''[t], x1[0] == -1, x2[0] == 2, x3[0] == -1, x1'[0] == 0,       x2'[0] == 0, x3'[0] == 0}, {x1, x2, x3}, t]      Out[1]= {{x1 ->      Function[{t}, (E^(-I Sqrt[2 - Sqrt[2]] t -           I Sqrt[2 + Sqrt[2]] t) (-2 E^(I Sqrt[2 - Sqrt[2]] t) +            24 (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) -            16 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) -            8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(            I Sqrt[2 - Sqrt[2]] t) + (           8 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 - Sqrt[2]] t))/Sqrt[           2 - Sqrt[2]] -            2 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(            I Sqrt[2 - Sqrt[2]] t) +            2 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(            I Sqrt[2 - Sqrt[2]] t) +            16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(            I Sqrt[2 - Sqrt[2]] t) +            8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(            I Sqrt[2 - Sqrt[2]] t) -            88 (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) +            63 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) -            8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(            I Sqrt[2 + Sqrt[2]] t) + (           8 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 + Sqrt[2]] t))/Sqrt[           2 - Sqrt[2]] -            32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(            I Sqrt[2 + Sqrt[2]] t) +            16 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(            I Sqrt[2 + Sqrt[2]] t) +            18 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(            I Sqrt[2 + Sqrt[2]] t) +            9 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(            I Sqrt[2 + Sqrt[2]] t) -            88 (2 + Sqrt[2]) E^(            2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +            65 Sqrt[2] (2 + Sqrt[2]) E^(            2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) -            8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(            2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) + (           8 (2 + Sqrt[2])^(3/2) E^(            2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t))/Sqrt[           2 - Sqrt[2]] -            32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(            2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +            16 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(            2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +            14 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          7 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          2 E^(I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          24 (2 + Sqrt[2]) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -          16 Sqrt[2] (2 + Sqrt[2]) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -          8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) + (         8 (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] +          2 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -          2 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t)))/(32 (-2 +          Sqrt[2]) Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] (-Sqrt[((          2 + Sqrt[2])/(2 - Sqrt[2]))] + Sqrt[(2 (2 + Sqrt[2]))/(         2 - Sqrt[2])]))],   x2 -> Function[{t}, (E^(-I Sqrt[2 - Sqrt[2]] t -         I Sqrt[2 + Sqrt[2]] t) (2 E^(I Sqrt[2 - Sqrt[2]] t) -          2 Sqrt[2] E^(I Sqrt[2 - Sqrt[2]] t) -          56 (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) +          40 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) +          16 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t) - (         24 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 - Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] +          6 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t) -          4 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t) +          8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t) - 16 E^(I Sqrt[2 + Sqrt[2]] t) -          16 Sqrt[2] E^(I Sqrt[2 + Sqrt[2]] t) -          190 (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) +          135 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) + (         16 (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t))/(2 - Sqrt[2]) - (         8 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t))/(         2 - Sqrt[2]) -          24 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 + Sqrt[2]] t) + (         32 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 + Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] -          32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) +          24 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) +          16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) -          Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) -          16 E^(2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) -          16 Sqrt[2] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) -          194 (2 + Sqrt[2]) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          137 Sqrt[2] (2 + Sqrt[2]) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) + (         16 (2 + Sqrt[2]) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t))/(         2 - Sqrt[2]) - (         8 Sqrt[2] (2 + Sqrt[2]) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t))/(         2 - Sqrt[2]) -          24 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) + (         32 (2 + Sqrt[2])^(3/2) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] -          32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          24 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) -          2 E^(I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          2 Sqrt[2] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -          56 (2 + Sqrt[2]) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          40 Sqrt[2] (2 + Sqrt[2]) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          16 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) - (         24 (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] -          6 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          4 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t)))/(16 (-2 +          Sqrt[2])^2 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] (-Sqrt[((          2 + Sqrt[2])/(2 - Sqrt[2]))] + Sqrt[(2 (2 + Sqrt[2]))/(         2 - Sqrt[2])]))],   x3 -> Function[{t}, (E^(-I Sqrt[2 - Sqrt[2]] t -         I Sqrt[2 + Sqrt[2]] t) (-2 E^(I Sqrt[2 - Sqrt[2]] t) +          24 (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) -          16 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) -          8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t) + (         8 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 - Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] -          2 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t) +          2 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t) +          16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t) +          8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t) -          88 (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) +          63 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) -          8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 + Sqrt[2]] t) + (         8 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 + Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] -          32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) +          16 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) +          18 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) +          9 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 + Sqrt[2]] t) -          88 (2 + Sqrt[2]) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          65 Sqrt[2] (2 + Sqrt[2]) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) -          8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) + (         8 (2 + Sqrt[2])^(3/2) E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] -          32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          16 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          14 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          7 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +          2 E^(I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          24 (2 + Sqrt[2]) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -          16 Sqrt[2] (2 + Sqrt[2]) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -          8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) + (         8 (2 + Sqrt[2])^(3/2) E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t))/Sqrt[         2 - Sqrt[2]] +          2 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -          2 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +          8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(          I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t)))/(32 (-2 +          Sqrt[2]) Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] (-Sqrt[((          2 + Sqrt[2])/(2 - Sqrt[2]))] + Sqrt[(2 (2 + Sqrt[2]))/(         2 - Sqrt[2])]))]}}In[2]:= FullSimplify[(E^(-I Sqrt[2 - Sqrt[2]] t -      I Sqrt[2 + Sqrt[2]] t) (-2 E^(I Sqrt[2 - Sqrt[2]] t) +       24 (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) -       16 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 - Sqrt[2]] t) -       8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(       I Sqrt[2 - Sqrt[2]] t) + (      8 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 - Sqrt[2]] t))/Sqrt[      2 - Sqrt[2]] -       2 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(I Sqrt[2 - Sqrt[2]] t) +       2 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(       I Sqrt[2 - Sqrt[2]] t) +       16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(       I Sqrt[2 - Sqrt[2]] t) +       8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(       I Sqrt[2 - Sqrt[2]] t) -       88 (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) +       63 Sqrt[2] (2 + Sqrt[2]) E^(I Sqrt[2 + Sqrt[2]] t) -       8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(       I Sqrt[2 + Sqrt[2]] t) + (      8 (2 + Sqrt[2])^(3/2) E^(I Sqrt[2 + Sqrt[2]] t))/Sqrt[      2 - Sqrt[2]] -       32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(       I Sqrt[2 + Sqrt[2]] t) +       16 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(       I Sqrt[2 + Sqrt[2]] t) +       18 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(       I Sqrt[2 + Sqrt[2]] t) +       9 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(       I Sqrt[2 + Sqrt[2]] t) -       88 (2 + Sqrt[2]) E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +       65 Sqrt[2] (2 + Sqrt[2]) E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) -       8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) + (      8 (2 + Sqrt[2])^(3/2) E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t))/Sqrt[      2 - Sqrt[2]] -       32 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +       16 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +       14 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +       7 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(       2 I Sqrt[2 - Sqrt[2]] t + I Sqrt[2 + Sqrt[2]] t) +       2 E^(I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +       24 (2 + Sqrt[2]) E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -       16 Sqrt[2] (2 + Sqrt[2]) E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -       8 Sqrt[2/(2 - Sqrt[2])] (2 + Sqrt[2])^(3/2) E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) + (      8 (2 + Sqrt[2])^(3/2) E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t))/Sqrt[      2 - Sqrt[2]] +       2 Sqrt[(2 + Sqrt[2])/(2 - Sqrt[2])] E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) -       2 Sqrt[(2 (2 + Sqrt[2]))/(2 - Sqrt[2])] E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +       16 Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t) +       8 Sqrt[2 (2 - Sqrt[2]) (2 + Sqrt[2])] E^(       I Sqrt[2 - Sqrt[2]] t + 2 I Sqrt[2 + Sqrt[2]] t)))/(32 (-2 +       Sqrt[2]) Sqrt[(2 - Sqrt[2]) (2 + Sqrt[2])] (-Sqrt[((       2 + Sqrt[2])/(2 - Sqrt[2]))] + Sqrt[(2 (2 + Sqrt[2]))/(      2 - Sqrt[2])]))]Out[2]= 1/2 ((-1 + Sqrt[2]) Cos[     Sqrt[2 - Sqrt[2]] t] - (1 + Sqrt[2]) Cos[Sqrt[2 + Sqrt[2]] t])If you study that carefully you can perhaps see what I scraped out of the inside ofOut[ 1 ] = {{ x->Function[ { t } ,... ]to paste intoIn[ 2 ] := FullSimplify[ ... ] and perhaps then what I wrote in the previous message will make more sense.
Posted 10 years ago
 Thanks. That was a great explanation. I now have three single-line functions. But when I try to plot them, I'm only allowed to do this one at a time. Isn't there a way to plot all three in the same graph?
Posted 10 years ago
 Please ignore my last post. I've found out how to do it. Very many thanks for all your help. RJ
Posted 10 years ago
 Click the "red spikey ball" which opens an empty little rectangle and SelectCopyPaste code from your Notebook into the rectangle. Then manually clean that up. Then post. Then edit to fix the formatting changes it still introduced, usually introducing extra NewLines, and finally save again.Alternately, manually inserting a space before and after every bracket can sometimes confuse the forum software into leaving the brackets alone.Now If you wrestle with Mathematica until you force it to Simplify[ N [ theExpressionOfYourFunction ] ] , not just trying to tell it to Simplify the whole function, you should find your functions are all no more complicated than.0.103553(E^(0.765367 I t)+E^(-0.765367 I t)) -0.603553(E^(1.84776 I t)-E^(-1.84776 I t))Or by scraping the second argument to your Function[ {t}, theExpressionOfYourFunction ] and pasting that into a new cell and wrapping FullSimplify around it you may even get something as simple as1/2((-1+Sqrt[2])Cos[Sqrt[2-Sqrt[2]]t]-(1+Sqrt[2])Cos[Sqrt[2+Sqrt[2]]t])And if you want to have more than one little empty rectangle to post code then you may have to repeatedly fiddle with it to keep it from pasting your second block of code onto the end of the first block, even if you repeatedly undo that and try that again. And again. And again. There is something not obvious about characters outside the box that are involved with that.
Posted 10 years ago
 I'm very interested in what you have written but I'm afraid I'm having difficulty in understanding you. What exactly do you mean by theExpressionOfYourFunction?
Posted 10 years ago
 Code is clearer when formatted in code boxes. See    http://community.wolfram.com/groups/-/m/t/151347, under      General tips          - For Mathematica code
Posted 10 years ago
 I don't understand how you got any answers without putting arguments in the variables. It should look like
DSolve[{-2*x1 + x2 == x1'', -2*x2 + x3 + x1 ==
x2'', -2*x3 + x2 == x3'', x1[0] == -1, x2[0] == 2,
x3[0] == -1, x1'[0] == 0, x2'[0] == 0, x3'[0] == 0}, {x1, x2, x3},
t]
Yes, the solution is complicated, but so is your problem.  Did you try substituting the solution into the problem?
Posted 10 years ago
 I don't understand how all my 's disappeared. I did a block copy of the syntax in my Mathematica notebook. Anyhow, I posted the same message on another mathematics forum (with the 's intact) and got two useful replies which solved my problem. Many thanks to everyone for their help. RJ
Posted 10 years ago
 All the square brackets t close brackets disappeared again!