|
13 | 13 | (*If you find any bug or change of variables that does not give the correct answers please message me on github https://github.com/BoGGoG/Mathematica-ChangeVariables or best: Create an issue on github =)*)
|
14 | 14 |
|
15 | 15 |
|
16 |
| -(* ::Input:: *) |
17 |
| -(*packagePath = FileNameJoin[{NotebookDirectory[], "ChangeVariables.wl"}];*) |
18 |
| -(*Get[packagePath]*) |
| 16 | +(* ::Input::Initialization:: *) |
| 17 | +packagePath = FileNameJoin[{NotebookDirectory[], "ChangeVariables.wl"}]; |
| 18 | +Get[packagePath] |
19 | 19 |
|
20 | 20 |
|
21 |
| -(* ::Input:: *) |
22 |
| -(*?ChangeVariables*) |
| 21 | +(* ::Input::Initialization:: *) |
| 22 | +?ChangeVariables |
23 | 23 |
|
24 | 24 |
|
25 | 25 | (* ::Section:: *)
|
|
32 | 32 | (*If you want to change from x to u=x^2, then you write:*)
|
33 | 33 |
|
34 | 34 |
|
35 |
| -(* ::Input:: *) |
36 |
| -(*ChangeVariables[x f[x], x, u, (#^2&)]*) |
| 35 | +(* ::Input::Initialization:: *) |
| 36 | +ChangeVariables[x f[x], x, u, (#^2&)] |
37 | 37 |
|
38 | 38 |
|
39 | 39 | (* ::Text:: *)
|
40 | 40 | (*Note the two solutions, because x = +- Sqrt[u].*)
|
41 | 41 |
|
42 | 42 |
|
43 |
| -(* ::Input:: *) |
44 |
| -(*ChangeVariables[Cos[x] f[x,y], x, u, (Cos[#] &)]*) |
| 43 | +(* ::Input::Initialization:: *) |
| 44 | +ChangeVariables[Cos[x] f[x,y], x, u, (Cos[#] &)] |
45 | 45 |
|
46 | 46 |
|
47 | 47 | (* ::Text:: *)
|
|
52 | 52 | (*Derivatives also work: x -> u = Sqrt[x]*)
|
53 | 53 |
|
54 | 54 |
|
55 |
| -(* ::Input:: *) |
56 |
| -(*ChangeVariables[x D[f[a,b,x,y,z], x], x, u, (#^(1/2)&)]*) |
| 55 | +(* ::Input::Initialization:: *) |
| 56 | +ChangeVariables[x D[f[a,b,x,y,z], x], x, u, (#^(1/2)&)] |
57 | 57 |
|
58 | 58 |
|
59 |
| -(* ::Input:: *) |
60 |
| -(*ChangeVariables[D[f[x],x], x, r, (1/#&)]*) |
| 59 | +(* ::Input::Initialization:: *) |
| 60 | +ChangeVariables[D[f[x],x], x, r, (1/#&)] |
61 | 61 |
|
62 | 62 |
|
63 |
| -(* ::Input:: *) |
64 |
| -(*ChangeVariables[Cos[x] D[f[x,y], {x,2}], x, u, (Cos[#] &)]*) |
| 63 | +(* ::Input::Initialization:: *) |
| 64 | +ChangeVariables[Cos[x] D[f[x,y], {x,2}], x, u, (Cos[#] &)] |
0 commit comments