Carl Love

Carl Love

28045 Reputation

25 Badges

12 years, 334 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

According to the help page ?Export, the following 63 file formats are supported for programmatic exporting, (i.e., not requiring any menu-based command or user interaction):

AMF  Base64  BMP  BSON  BYU  CNF  CSV  DGML  DIF  Digraph6  DIMACS  DOT  DXF  FASTA
FASTQ  GDF  GenBank  GeoJSON  GEXF  GIF  Graph6  Graphlet  GraphML  GXL  GZIP  INI
JGF  JPEG  JSON   Jupyter  JVX  LaTeX  LEDA  MathML  MAT  MatrixMarket  MetaPost  MLA
MPL  MW  Newick  OBJ  ODS  OFF  Pajek  PLY  PNG  SMTLIB  Sparse6  STL  SXC  Text  TGF
TSV  UBJSON  VTK  WMF  XLS  XLSX  XML  YAML  ZIP  ZLIB

It's an impressive list, but it doesn't include PDF.

@Carl Love My idea for reducing the number of powers of the base that need to be checked was easier to implement than I initially thought it would be, and it's now included in the code above.

The system that you call OdeSys contains derivatives taken with respect to both xi and eta. That makes them partial differential equations (PDEs), not ordinary differential equations (ODEs). Solving PDEs is vastly more complicated than ODEs. Since I've seen variations of this system countless times here on MaplePrimes, I suspect that you're working from a text that shows a technique for completely eliminating the variable xi

@mmcdara You wrote:

  • we both implicitely assume then the number to be partionned was a positive integer. What does the OP want if this number is negative and the set of number contains negative numbers...?

No, the OP said explicitly in the first sentence of the Question that they were positive integers.

I combined your two Posts into the above. If you wish to include additional material, please put it as a Comment to this Post rather than as a separate Post.

@sand15 Hyperlinks can be directly embedded in MaplePrimes posts by using Ctrl-K or the toolbar item that looks like two links of chain. I edited your posts in this thread to convert your links to true hyperlinks.

@Samir Khan I don't know if MapleFlow supports the remove statement yet, but if it does, then a more direct way to Answer the Question (as originally posed) is

remove(type, L, string)

What is the axis of revolution? If you use one of the coordinate axes, you'll get something closer to a sphere than to a torus.

@rlopez These Typesetting-based adjustments only affect the display of expressions. The determination of equality is up to the kernel, not the GUI display.

@ecterrab: The width of the n-dash is fine by me. However, I think that the vertical thickness of the line is too thin. Could it be made bold? It also seems too low vertically when applied to a numeral (this might depend on the font).

What about the other issue that I showed in that worksheet, the extra very thin space between the n and the minus sign in the prettyprinted display of n-x, where n is a numeral? In other words, the minus sign is not exactly centered between its operands.

In the situation that you describe---"being unable to do anything (even 2+2)"---do the characters "2+2" appear on the screen as they are typed?

The coloring conditional can be simplified in a much more understandable way with xor, i.e., "exclusive or":

a xor b  iff  (a or b) and not (a and b)  iff  (a and not b) or (b and not a)

The evalf[4](evalhf(...)) is better handled by first making an hfloat Array and then rounding it to 4 decimal places:

restart:
RC:= (0..35, 0..9):
DocumentTools:-Tabulate(
    <
        <x, seq(nprintf(`#mi("%.2f");`, j/100), j= RC[2])>^%T,
        <
            <seq(nprintf(`#mi("%.1f");`, i/10), i= RC[1])>  |
            (evalf[4]~@rtable)(
                RC, (i,j)-> (1+erf((10*i+j)/100/sqrt(2)))/2, datatype= hfloat
            )
        >
   >,
   exterior= none,
   fillcolor= ((T,i,j)-> `if`(i=1 xor j=1, "LightBlue", "White"))
):

@Christopher2222 As far as I can tell, ToInert does nothing in your example, nor would I expect it to. The alias commands do all the work. Indeed, if ToInert did do something here, that would definitely be a bug, because it would mean that ToInert has an unintentional and undocumented side effect.

Here is your worksheet, which I've re-executed, and the only change I made was commenting out the ToInerts.
 

NULL

General metric

Lecture 5 in Math Prediction

NULL

NULL

restart

with(Physics); Setup(mathematicalnotation = true); Setup(signature = `+---`)

[signature = `+ - - -`]

ds2 := exp(v(r, t))*c^2*dt^2-exp(lambda(r, t))*dr^2-r^2*(da^2+sin(a)^2*dp^2)

exp(v(r, t))*c^2*dt^2-exp(lambda(r, t))*dr^2-r^2*(da^2+sin(a)^2*dp^2)

Setup(coordinatesystems = (Z = [t, r, a, p]), metric = ds2)

[coordinatesystems = {Z}, metric = {(1, 1) = exp(v(r, t))*c^2, (2, 2) = -exp(lambda(r, t)), (3, 3) = -r^2, (4, 4) = -r^2*sin(a)^2}, spaceindices = lowercaselatin_is]

g_[]

Physics:-g_[mu, nu] = Matrix(%id = 36893490730637264524)

Christoffel[`~alpha`, mu, nu, nonzero]

Physics:-Christoffel[`~alpha`, mu, nu] = {(1, 1, 1) = (1/2)*(diff(v(r, t), t)), (1, 1, 2) = (1/2)*(diff(v(r, t), r)), (1, 2, 1) = (1/2)*(diff(v(r, t), r)), (1, 2, 2) = (1/2)*exp(-v(r, t)+lambda(r, t))*(diff(lambda(r, t), t))/c^2, (2, 1, 1) = (1/2)*c^2*exp(v(r, t)-lambda(r, t))*(diff(v(r, t), r)), (2, 1, 2) = (1/2)*(diff(lambda(r, t), t)), (2, 2, 1) = (1/2)*(diff(lambda(r, t), t)), (2, 2, 2) = (1/2)*(diff(lambda(r, t), r)), (2, 3, 3) = -exp(-lambda(r, t))*r, (2, 4, 4) = -exp(-lambda(r, t))*r*sin(a)^2, (3, 2, 3) = 1/r, (3, 3, 2) = 1/r, (3, 4, 4) = -sin(a)*cos(a), (4, 2, 4) = 1/r, (4, 3, 4) = cot(a), (4, 4, 2) = 1/r, (4, 4, 3) = cot(a)}

Ricci[nonzero]

Physics:-Ricci[mu, nu] = {(1, 1) = (1/4)*(2*((diff(diff(v(r, t), r), r))*r+(1/2)*(diff(v(r, t), r))*((diff(v(r, t), r))*r-(diff(lambda(r, t), r))*r+4))*c^2*exp(v(r, t)-lambda(r, t))-2*(diff(diff(lambda(r, t), t), t)-(1/2)*(diff(lambda(r, t), t))*(diff(v(r, t), t)-(diff(lambda(r, t), t))))*r)/r, (1, 2) = (diff(lambda(r, t), t))/r, (2, 1) = (diff(lambda(r, t), t))/r, (2, 2) = (1/4)*(2*(diff(diff(lambda(r, t), t), t)-(1/2)*(diff(lambda(r, t), t))*(diff(v(r, t), t)-(diff(lambda(r, t), t))))*r*exp(-v(r, t)+lambda(r, t))-2*((1/2)*r*(diff(v(r, t), r))^2-(1/2)*r*(diff(v(r, t), r))*(diff(lambda(r, t), r))+(diff(diff(v(r, t), r), r))*r-2*(diff(lambda(r, t), r)))*c^2)/(c^2*r), (3, 3) = 1+(1/2)*(-(diff(v(r, t), r))*r+(diff(lambda(r, t), r))*r-2)*exp(-lambda(r, t)), (4, 4) = -(1/2)*(-2+((diff(v(r, t), r))*r-(diff(lambda(r, t), r))*r+2)*exp(-lambda(r, t)))*sin(a)^2}

Ricci[scalar]

(1/2)*(-exp(v(r, t))*(diff(lambda(r, t), r))*(diff(v(r, t), r))*exp(-v(r, t)-lambda(r, t))*c^2*r^2+exp(v(r, t))*(diff(v(r, t), r))^2*exp(-v(r, t)-lambda(r, t))*c^2*r^2+2*exp(v(r, t))*(diff(diff(v(r, t), r), r))*exp(-v(r, t)-lambda(r, t))*c^2*r^2-2*exp(v(r, t))*(diff(lambda(r, t), r))*exp(-v(r, t)-lambda(r, t))*c^2*r+2*exp(v(r, t))*(diff(v(r, t), r))*exp(-v(r, t)-lambda(r, t))*c^2*r+exp(lambda(r, t))*(diff(v(r, t), t))*(diff(lambda(r, t), t))*exp(-v(r, t)-lambda(r, t))*r^2-exp(lambda(r, t))*(diff(lambda(r, t), t))^2*exp(-v(r, t)-lambda(r, t))*r^2-2*exp(lambda(r, t))*(diff(diff(lambda(r, t), t), t))*exp(-v(r, t)-lambda(r, t))*r^2-2*(diff(lambda(r, t), r))*exp(-lambda(r, t))*c^2*r+2*exp(-lambda(r, t))*(diff(v(r, t), r))*c^2*r+4*exp(-lambda(r, t))*c^2-4*c^2)/(c^2*r^2)

NULL

NULL

alias(diff(v(t), t) = diff(v(r, t), t))

alias(diff(v(t), t, t) = diff(v(r, t), t, t))

alias(diff(v(x), x) = diff(v(r, t), r))

alias(diff(v(x), x, x) = diff(v(r, t), r, r))

NULL

alias(diff(lambda(t), t) = diff(lambda(r, t), t))

alias(diff(lambda(x), x) = diff(lambda(r, t), r))

alias(diff(lambda(x), x, x) = diff(lambda(r, t), r, r))

alias(diff(lambda(t), t, t) = diff(lambda(r, t), t, t))

NULL

Ricci[scalar]

(1/2)*(-exp(v(r, t))*`&lambda;'`*`v'`*exp(-v(r, t)-lambda(r, t))*c^2*r^2+exp(v(r, t))*`v'`^2*exp(-v(r, t)-lambda(r, t))*c^2*r^2+2*exp(v(r, t))*(diff(`v'`, r))*exp(-v(r, t)-lambda(r, t))*c^2*r^2-2*exp(v(r, t))*`&lambda;'`*exp(-v(r, t)-lambda(r, t))*c^2*r+2*exp(v(r, t))*`v'`*exp(-v(r, t)-lambda(r, t))*c^2*r+exp(lambda(r, t))*(diff(v(t), t))*(diff(lambda(t), t))*exp(-v(r, t)-lambda(r, t))*r^2-exp(lambda(r, t))*(diff(lambda(t), t))^2*exp(-v(r, t)-lambda(r, t))*r^2-2*exp(lambda(r, t))*(diff(diff(lambda(t), t), t))*exp(-v(r, t)-lambda(r, t))*r^2-2*`&lambda;'`*exp(-lambda(r, t))*c^2*r+2*exp(-lambda(r, t))*`v'`*c^2*r+4*exp(-lambda(r, t))*c^2-4*c^2)/(c^2*r^2)

NULL

NULL

Download ToInert.mw

@sursumCorda The command ArrayTools:-Alias can be used to create a separate in-place pointer to an rtable (ArrayMatrixVector) with a different dimensionality. So you can switch back and forth between matrices and vectors, whatever your commands prefer, with no copying of the data.

@jalal That's good.

You can get rid of the displayed quotes, get rid of interface, and simplify the coloring conditional like this:  

restart:
DocumentTools:-Tabulate(
    <
        <x, seq(nprintf(`#mi("0.0%d");`, j), j= 0..9)>^%T,
        <
            <seq(nprintf(`#mi("%d.%d");`, iquo(i,10,'r'), r), i= 0..35)> |
            Matrix((36,10), (i,j)-> evalf[4](evalhf((1+erf((10*i+j-11)/100/sqrt(2)))/2)))
        >
   >,
   exterior= none,
   fillcolor= ((T,i,j)-> `if`(i*j = 1 or i*j > max(i,j), "White", "LightBlue"))
):

@sursumCorda Yes, you're right. Thanks for noticing that. So a corrected Matrix constructor is

<
    <x, seq(nprintf("%4.2f", j/100), j= 0..9)>^%T,
    <
        <seq(nprintf("%3.1f", i/10), i= 0..35)> |
        Matrix((36,10), (i,j)-> evalf[4](evalhf((1+erf((10*i+j-11)/100/sqrt(2)))/2)))
    >
>;
First 46 47 48 49 50 51 52 Last Page 48 of 709