MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • Construction of standard quadrilaterals

          Muchametshina Liya,  8th class,  school № 57, Kazan, Russia


                       Square

                      Rectangle     
                      
                      Rhombus        
     
                      Parallelogram

                       Trapeze

    Construction of square

    > restart:
    > with(plottools):
           Сoordinates (x;y) of the lower left corner of the square and the side "а"
    > x:=0;y:=3;a:=6;

                                    x := 0


                                    y := 3


                                    a := 6

          Construction of the square
    > P1:=plot([[x,y],[x,y+a],[x+a,y+a],[x+a,y],[x,y]],color=green,thickness=4):
    > plots[display](P1,scaling=CONSTRAINED);

    The setting of the second square wich moved relative to the first on the vector (2;-3) (vector can be changed) and with side "а-1" (the length of a side can be changed)P2:=plot([[x+2,y-3],[x+2,y-3+a-1],[x+2+a-1,y-3+a-1],[x+2+a-1,y-3],[x+2,y-3]],color=black,thickness=4):
    > plots[display](P1,P2,scaling=CONSTRAINED);

    Construction of rectangle

    > restart:
    > with(plottools):
            Сoordinates (x;y) of the lower left corner of the square and the "а" and "b" sides
    > x:=0;y:=2;a:=3;b:=9;
    >

                                    x := 0


                                    y := 2


                                    a := 3


                                    b := 9

           The rectangle is specified by the sequence of vertices with given the lengths "a" and "b"
    > l:=plot([[x,y],[x,y+a],[x+b,y+a],[x+b,y],[x,y]]):
    > plots[display](l,scaling=CONSTRAINED,thickness=4);
    Construction of rhombus

    > restart:
    > with(plottools):
          The coordinates (x;y) of the initial vertex of the rhombus and the half of the diagonals "a" and "b"
    > x:=0;y:=2;a:=3;b:=4;

                                    x := 0


                                    y := 2


                                    a := 3


                                    b := 4

           Rhombus is specified by the sequence of vertices with the values "a" and "b"
    > ll:=plot([[x,y],[x+a,y+b],[x+a+a,y],[x+a,y-b],[x,y]]):
    > plots[display](ll,scaling=CONSTRAINED,thickness=4);

    Construction of parallelogram

    > restart:
    > with(plottools):
          (х;у) - the starting point, (i;j) - the displacement vector of starting point, "а" - the base of the parallelogram
    > x:=0;y:=0;i:=4;j:=5;a:=10;

                                    x := 0


                                    y := 0


                                    i := 4


                                    j := 5


                                   a := 10

         The parallelogram is defined by the sequence of vertices
    > P1:=plot([[x,y],[x+i,y+j],[x+i+a,y+j],[x+a,y],[x,y]]):
    > plots[display](P1,scaling=CONSTRAINED,thickness=4);
     If  i= 0  it turns out the rectangleget.
           If  j= а  it turns out the  square.
           If  a := sqrt(i^2+j^2) it turns out the rhombus. a:=sqrt(i^2+j^2):

    Construction of trapeze

    Trapeze general form
    > restart:
    > with(plottools):
    >
            (х;у) - the starting point, (i;j) - the displacement vector of starting point, а - the larger base of the trapezoid
    > x:=0;y:=2;i:=1;j:=5;a:=11;

                                    x := 0


                                    y := 2


                                    i := 1


                                    j := 5


                                   a := 11

             The trapez is defined by the sequence of vertices     
    > P1:=plot([[x,y],[x+i,y+j],[x+i+j,y+j],[x+i+a,y],[x,y]]):
    > plots[display](P1,scaling=CONSTRAINED,thickness=4);
    Rectangular trapezoid
    > restsrt:
    > with(plottools):
    > x:=0;y:=2;i:=0;j:=6;a:=11;

                                    x := 0


                                    y := 2


                                    i := 0


                                    j := 6


                                   a := 11

    > P1:=plot([[x,y],[x,y+j],[x+j,y+j],[x+a,y]]):
    > plots[display](P1,scaling=CONSTRAINED,thickness=4);
    Isosceles trapezoid
    > restart:
    > with(plottools):
    > x:=0;y:=2;i:=4;j:=6;a:=15;

                                    x := 0


                                    y := 2


                                    i := 4


                                    j := 6


                                   a := 15

    > P1:=plot([[x,y],[x+i,y+j],[x+j+i,y+j],[x+a,y],[x,y]]):
    > plots[display](P1,scaling=CONSTRAINED,thickness=4);



     

     

     

    Anyone interested in modifying and expanding the Maple FIFA simulation for the Eurocup to include the knockout round?  Any interest?

    > restart;
    > a := -10; b := 10; ps := seq(plot([i, t, t = -20 .. 20], x = -10 .. 10, y = -20 .. 20, color = red, style = point), i = a .. b);

    plots[display](ps, insequence = true); p := plots[display](ps, insequence = true);

     

    restart:
    with(plots):
    y=sin(x);
    p:=implicitplot(y=sin(x),x=-10..10,y=-2..2,thickness=4,color=red,scaling=constrained,numpoints=1000):
    plots[display](p);

     

    y=sin(3*x);
    p0:=implicitplot(y=sin(x),x=-10..10,y=-5..5,thickness=3,color=red,scaling=constrained,numpoints=1000,linestyle=2,style=POINT,symbol=CROSS):
    p1:=implicitplot(y=sin(3*x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
    plots[display](p0,p1);
    y=sin(1/3*x);
    p11:=implicitplot(y=sin(1/3*x),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
    plots[display](p0,p11);

     

     

    y=2*sin(x);
    p2:=implicitplot(y=2*sin(x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
    plots[display](p0,p2);
    y=1/2*sin(x);
    p22:=implicitplot(y=1/2*sin(x),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
    plots[display](p0,p22);

     

    y=2+sin(x);
    p3:=implicitplot(y=2+sin(x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
    plots[display](p0,p3);
    y=sin(x)-2;
    p33:=implicitplot(y=sin(x)-2,x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
    plots[display](p0,p33);

    y=sin(x+2);
    p4:=implicitplot(y=sin(x+2),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
    plots[display](p0,p4);
    y=sin(x-2);
    p44:=implicitplot(y=sin(x-2),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
    plots[display](p0,p44);

    y=-sin(x);
    p7:=implicitplot(y=-sin(x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
    plots[display](p0,p7);
    y=sin(-x);
    p77:=implicitplot(y=sin(-x),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
    plots[display](p0,p77);

     

    y=abs(sin(x));
    p00:=implicitplot(y=sin(x),x=-10..10,y=-5..5,thickness=3,color=red,scaling=constrained,numpoints=1000,linestyle=2,style=POINT,symbol=BOX):
    p5:=implicitplot(y=abs(sin(x)),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
    plots[display](p00,p5);
    plots[display](p5,scaling=constrained);

    y=sin(abs(x));
    p00:=implicitplot(y=sin(x),x=-10..10,y=-5..5,thickness=3,color=red,scaling=constrained,numpoints=1000,linestyle=2,style=POINT,symbol=BOX):
    p6:=implicitplot(y=sin(abs(x)),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
    plots[display](p00,p6);
    plots[display](p6,scaling=constrained);

     

     

    Post gialid_GEODROMchik - what is this?

    Pilot project of Secondary school # 57 of Kazan, Russia

    Use of Maple

    in Mathematics Education by mathematics teacher Alsu Gibadullina

    and in scientific work of schoolchildren

     

    Examples made using the Maple

    the 6th class

     

                  Arina                         Elza                             David    

           

           Book.mws              Kolobok.mws               sn_angl.mws

     

             Artur    

     

     

    A few people have asked me how I created the sections in the Maple application in this video: https://youtu.be/voohdmfTRn0?t=572

    Here's the worksheet (Maple 2016 only). As you can see, the “sections” look different what you would normally expect (I often like to experiment with small changes in presentation!)

    These aren't, however, sections in the traditional Maple sense; they're a demonstration of Maple 2016's new tools for programmatically changing the properties of a table (including the visibility of its rows and columns). @dskoog gets the credit for showing me the technique.

    Each "section" consists of a table with two rows.

    • The table has a name, specified in its properties.
    • The first row (colored blue) contains (1) a toggle button and (2) the title of each section (with the text in white)
    • The second row (colored white) is visible or invisible based upon the state of the toggle button, and contains the content of my section.

    Each toggle button has

    • a name, specified in its properties
    • + and - images associated with its on and off states (with the image background color matching the color of the first table row)
    • Click action code that enables or disables the visibility of the second row

    The Click action code for the toggle button in the "Pure Fluid Properties" section is, for example,

    tableName:="PureFluidProperties_tb":
    buttonName:="PureFluidProperties_tbt":
    if DocumentTools:-GetProperty(buttonName, 'value') = "false" then   
         DocumentTools:-SetProperty([tableName, 'visible[2..]', true]);
    else
         DocumentTools:-SetProperty([tableName, 'visible[2..]', false]);
    end if;

    As I said at the start, I often try to make worksheets look different to the out-of-the-box defaults. Programmatic table properties have simply given me one more option to play about with.

    Disclaimer: This blog post has been contributed by Prof. Nicola Wilkin, Head of Teaching Innovation (Science), College of Engineering and Physical Sciences and Jonathan Watkins from the University of Birmingham Maple T.A. user group*. 

    Written for Maple T.A. 2016. For Maple T.A. 10 users, this question can be written using the queston designer.

     

    This is the second of three blog posts about working with data sets in Maple.

    In my previous post, I discussed how to use Maple to access a large number of data sets from Quandl, an online data aggregator. In this post, I’ll focus on exploring built-in data sets in Maple.

    Data is being generated at an ever increasing rate. New data is generated every minute, adding to an expanding network of online information. Navigating through this information can be daunting. Simply preparing a tabular data set that collects information from several sources is often a difficult and time consuming effort. For example, even though the example in my previous post only required a couple of lines of Maple code to merge 540 different data sets from various sources, the effort to manually search for and select sources for data took significantly more time.

    In an attempt to make the process of finding data easier, Maple’s built-in country data set collects information on country-specific variables including financial and economic data, as well as information on country codes, population, area, and more.

    The built-in database for Country data can be accessed programmatically by creating a new DataSets Reference:

    CountryData := DataSets:-Reference( "builtin", "country" );

    This returns a Reference object, which can be further interrogated. There are several commands that are applicable to a DataSets Reference, including the following exports for the Reference object:

    exports( CountryData, static );

    The list of available countries in this data set is given using the following:

    GetElementNames( CountryData );

    The available data for each of these countries can be found using:

    GetHeaders( CountryData );

    There are many different data sets available for country data, 126 different variables to be exact. Similar to Maple’s DataFrame, the columns of information in the built-in data set can be accessed used the labelled name.

    For example, the three-letter country codes for each country can be returned using:

    CountryData[.., "3 Letter Country Code"];

    The three-letter country code for Denmark is:

    CountryData["Denmark", "3 Letter Country Code"];

    Built-in data can also be queried in a similar manner to DataFrames. For example, to return the countries with a population density less than 3%:

    pop_density := CountryData[ .., "Population Density" ]:
    pop_density[ `Population Density` < 3 ];

    At this time, Maple’s built-in country data collection contains 126 data sets for 185 countries. When I built the example from my first post, I knew exactly the data sets that I wanted to use and I built a script to collect these into a larger data container. Attempting a similar task using Maple’s built-in data left me with the difficult decision of choosing which data sets to use in my next example.

    So rather than choose between these available options, I built a user interface that lets you quickly browse through all of Maple’s collection of built-in data.

    Using a couple of tricks that I found in the pages for Programmatic Content Generation, I built the interface pictured above. (I’ll give more details on the method that I used to construct the interface in my next post.)

    This interface allows you to select from a list of countries, and visualize up to three variables of the country data with a BubblePlot. Using the preassigned defaults, you can select several countries and then visualize how their overall number of internet users has changed along with their gross domestic product. The BubblePlot visualization also adds a third dimension of information by adjusting the bubble size according to the relative population compared with the other selected countries.

    Now you may notice that the list of available data sets is longer than the list of available options in each of the selection boxes. In order to be able to generate BubblePlot animations, I made an arbitrary choice to filter out any of the built-in data sets that were not of type TimeSeries. This is something that could easily be changed in the code. The choice of a BubblePlot could also be updated to be any other type of Statistical visualization with some additional modifications.

    You can download a copy of this application here: VisualizingCountryDataSets.mw

    You can also interact with it via the MapleCloud: http://maplecloud.maplesoft.com/application.jsp?appId=5743882790764544

    I’ll be following up this post with an in-depth post on how I authored the country selector interface using programmatic content generation.

    Since it's not every day we receive submission to the Maple Application Center that have words like "quantum entanglement" (and "teleportation"!) in the title, I thought I'd share this one:

    Matrix Representation of Quantum Entangled States: Understanding Bell's Inequality and Teleportation

     

    eithne

    I'm an educator (physicist) who has migrated to Maple because of the lower "activation barrier" to get something of interest produced by the student. The students in my courses are exposed to several language (Python, C++, Java) and mathematical systems (Mathematica, Maple, MATLAB.) Many claim that unless forced to used a particular language or system, their first choice is Python and Maple for the reason I cite. 

    As a consequence, it is my experience that students truly perfer the math-like appearance of the 2-D Math notation as opposed to the Maple notation. They see it as more natural - again with a lower activation barrier. Hence I see no reason to change. However, I would be interested in reasons why it might be beneficial.

    My ultimate question is: do I start them with worksheet mode or documents mode? I'm use to worksheet mode and have found the call and response method easy for them to understand. But document mode has many valuable benefits. Is it worth the increase in learning (and frustration) for the benefits if the students use the software only a few times per semester? Or for some, every week?

    I would be interested in hearing about the experiences of other educators.

     

    Greetings to all. I am writing today to share a personal story / exploration using Maple of an algorithm from the history of combinatorics. The problem here is to count the number of strings over a certain alphabet which consist of some number of letters and avoid a set of patterns (these patterns are strings as opposed to regular expressions.) This counting operation is carried out using rational generating functions that encode the number of admissible strings of length n in the coefficients of their series expansions. The modern approach to this problem uses the Goulden-Jackson method which is discussed, including a landmark Maple implementation from a paper by D. Zeilberger and J. Noonan, at the following link at math.stackexchange.com (Goulden-Jackson has its own website, all the remaining software described in the following discussion is available at the MSE link.) The motivation for this work was a question at the MSE link about the number of strings over a two-letter alphabet that avoid the pattern ABBA.

    As far as I know before Goulden-Jackson was invented there was the DFA-Method (Deterministic Finite Automaton also known as FSM, Finite State Machine.) My goal in this contribution was to study and implement this algorithm in order to gain insight about its features and how it influenced its powerful successor. It goes as follows for the case of a single pattern string: compute a DFA whose states represent the longest prefix of the pattern seen at the current position in the string as it is being scanned by the DFA, with the state for the complete pattern doubling as a final absorbing state, since the pattern has been seen. Translate the transitions of the DFA into a system of equations in the generating functions representing strings ending with a given maximal prefix of the pattern, very much like Markov chains. Finally solve the system of equations for the generating functions and thus obtain the sequence of values of strings of length n over the given alphabet that avoid the given pattern.

    I have also implemented the DFA method for sets of patterns as opposed to just one pattern. The algorithm is the same except that the DFA does not consist of a chain with backlinks as in the case of a single pattern but a tree of prefixes with backlinks to nodes higher up in the tree. The nodes in the tree represent all prefixes that need to be tracked where obviously a common prefix between two or more patterns is shared i.e. only represented once. The DFA transitions emanating from nodes that are leaves represent absorbing states indicating that one of the patterns has been seen. We run this algorithm once it has been verified that the set of patterns does not contain pairs of patterns where one pattern is contained in another, which causes the longer pattern to be eliminated at the start. (Obviously if the shorter pattern is forbidden the so is the longer.) The number of states of the DFA here is bounded above by the sum of the lengths of the patterns with subpatterns eliminated. The uniqueness property of shared common prefixes holds for subtrees of the main tree i.e. recursively. (The DFA method also copes easily with patterns that have to occur in a certain order.)

    I believe the Maple code that I provide here showcases many useful tricks and techniques and can help the reader advance in their Maple studies, which is why I am alerting you to the web link at MSE. I have deliberately aimed to keep it compatible with older versions of Maple as many of these are still in use in various places. The algorithm really showcases the power of Maple in combinatorics computing and exploits many different aspects of the software from the solution of systems of equations in rational generating functions to the implementation of data structures from computer science like trees. Did you know that Maple permits nested procedures as known to those who have met Lisp and Scheme during their studies? The program also illustrates the use of unit testing to detect newly introduced flaws in the code as it evolves in the software life cycle.

    Enjoy and may your Maple skills profit from the experience!

    Best regards,

    Marko Riedel

    The software is also available here: dfam-mult.txt

         Example of the equidistant surface at a distance of 0.25 to the surface
    x3
    -0.1 * (sin (4 * x1) + sin (3 * x2 + x3) + sin (2 * x2)) = 0
    Constructed on the basis of universal parameterization of surfaces.

    equidistant_surface.mw 


    Hi there, fellow primers, it's good to be back after almost 5 years! I just want to share a worksheet on Numerov's algorithm in Maple using procedures as I've recently found out that google could not find any Maple procedure that implements Numerov's algorithm to solve ODEs.   numerov.mw   Reference.pdf 

    This is the first of three blog posts about working with data sets in Maple.

    In 2013, I wrote a library for Maple that used the HTTP package to access the Quandl data API and import data sets into Maple. I was motivated by the fact that, when I was downloading data, I often used multiple data sources, manually updated data when updates were available, and cleaned or manipulated the data into a standardized form (which left me spending too much time on the data acquisition step).

    Simply put, I needed a source for data that would provide me with a searchable, stable data API, which would also return data in a form that did not require too much post-processing.

    My initial library had really just scratched the surface of what was possible.

    Maple 2015 introduced the new DataSets package, which fully integrated a data set search into core library routines and made its functionality more discoverable through availability in Maple’s search bar.

    Accessing online data suddenly became much easier. From within Maple, I could now search through over 12 million time series data sets provided by Quandl, and then automatically import the data into a format that I could readily work with.

    If you’re not already aware of this online service, Quandl is an online data aggregator that delivers a wide variety of high quality financial and economic data. This includes the latest data on stocks and commodities, exchange rates, and macroeconomic indicators such as population, inflation, unemployment, and so on. Quandl collects both open and proprietary data sets from many sources, such as the US Federal Reserve System, OECD, Eurostat, The World Bank, and Open Data for Africa. Best of all, Quandl's powerful API is free to use.

    One of the first examples for the DataSets package that I constructed was in part based on the inspirational work of Hans Rosling. I was drawn in by his ability to use statistical visualizations to break down complex multidimensional data sets and provide insight into underlying patterns; a key example investigating the correlation between rising incomes and life expectancy.

    As well as online data, the DataSets package had a database for country data. Hence it seemed fitting to add an example that explored macroeconomic indicators for several countries. Accordingly, I set out to create an example that visualized variables such as Gross Domestic Product, Life Expectancy, and Population for a collection of countries.

    I’ll now describe how I constructed this application.

    The three key variables are Gross Domestic Product at Power Purchasing Parity, Life Expectancy, and Population. Having browsed through Quandl’s website for available data sets, the World Bank and Open Data for Africa projects seemingly had the most available relevant data; therefore I chose these as my data sources.

    Pulling data for a single country from one of these sources was pretty straight forward. For example, the DataSets Reference for the Open Data for Africa data set on GDP at PPP for Canada is:

    DataSets:-Reference("quandl", "ODA/CAN_PPPPC"));

    In this command, the second argument is the Quandl data set code. If you are on Quandl’s website, this is listed near the top of the data set page as well as in the last few characters of the web address itself: https://www.quandl.com/data/ODA/CAN_PPPPC . Deconstructing the code, “ODA” stands for Open Data for Africa and the rest of the string is constructed from the three letter country code for Canada, “CAN”, and the code for the GDP and PPP. Looking at a small sample of other data set codes, I theorized that both of the data sources used a standardized data set name that included the ISO-3166 3-letter country code for available data sets. Based on this theory, I created a simple script to query for available data and discovered that there was data available for many countries using this standardized code. However, not every country had available data, so I needed to filter my list somewhat in order to pick only those countries for which information was available.

    The script that I had constructed required three letter country codes. In order to test all available countries, I created a table to house the country names and three-letter country codes using data from the built-in database for countries:

    ccdata := DataSets:-Builtin:-Reference("country")[.., "3 Letter Country Code"];
    cctable := table([seq(op(GetElementNames(ccdata[i])) = ccdata[i, "3 Letter Country Code"], 
    i = 1 .. CountRows(ccdata))]):

    My script filtered this table, returning a subset of the original table, something like:

    Countries := table( [“Canada” = “CAN”, “Sweden” = “SWE”, … ] );

    You can see the filtered country list in the code edit region of the application below.

    With this shorter list of countries, I was now ready to download some data. I created three vectors to hold the data sets by mapping in the DataSets Reference onto the “standardized” data set names that I pulled from Quandl. Here’s the first vector for the data on GDP at PPP.

    V1 := Vector( [ (x) -> Reference("quandl", cat("ODA/", x, "_PPPPC"))
                       ~([entries(Countries, nolist, indexorder)])]):
    #Open Data for Africa GDP at PPP

    Having created three data vectors consisting of 180 x 3 = 540 data sets, I was finally ready to visualize the large set of data that I had amassed.

    In Maple’s Statistics package, BubblePlots can use the horizontal axis, vertical axis and the relative bubble size to illustrate multidimensional information. Moreover, if incoming data is stored as a TimeSeries object, BubblePlots can generate animations over a common period of time.

    Putting all of this together generated the following animation for 180 available countries.

    This example will be included with the next version of Maple, but for now, you can download a copy here:DataSetsBubblePlot.mw

    *Note: if you try this application at home, it will download 540 data sets. This operation plus the additional BubblePlot construction can take some time, so if you just want to see the finished product, you can simply interact with the animation in the Maple worksheet using the animation toolbar.

    A more advanced example that uses multiple threads for data download can be seen at the bottom of the following page: https://www.maplesoft.com/products/maple/new_features/maple19/datasets_maple2015.pdf You can also interact with this example in Maple by searching for: ?updates,Maple2015,DataSets

    In my next post, I’ll discuss how I used programmatic content generation to construct an interactive application for data retrieval.

     

    Bug_in_integrate.mw

    M_Iwaniuk

    Below is the worksheet with the whole material presented yesterday in the webinar, “Applying the power of computer algebra to theoretical physics”, broadcasted by the “Institute of Physics” (IOP, England). The material was very well received, rated 4.5 out of 5 (around 30 voters among the more than 300 attendants), and generated a lot of feedback. The webinar was recorded so that it is possible to watch it (for free, of course, click the link above, it will ask you for registration, though, that’s how IOP works).

    Anyway, you can reproduce the presentation with the worksheet below (mw file linked at the end, or the corresponding pdf also linked with all the input lines executed). As usual, to reproduce the input/output you need to have installed the latest version of Physics, available in the Maplesoft R&D Physics webpage.

    Why computer algebra?

     

     

     

    ... and why computer algebra?


    We can concentrate more on the ideas instead of on the algebraic manipulations

     

    We can extend results with ease

     

    We can explore the mathematics surrounding a problem

     

    We can share results in a reproducible way

     

    Representation issues that were preventing the use of computer algebra in Physics

     

     


    Notation and related mathematical methods that were missing:


    coordinate free representations for vectors and vectorial differential operators,

    covariant tensors distinguished from contravariant tensors,

    functional differentiation, relativity differential operators and sum rule for tensor contracted (repeated) indices

    Bras, Kets, projectors and all related to Dirac's notation in Quantum Mechanics

     

    Inert representations of operations, mathematical functions, and related typesetting were missing:

     

    inert versus active representations for mathematical operations

    ability to move from inert to active representations of computations and viceversa as necessary

    hand-like style for entering computations and textbook-like notation for displaying results

     

    Key elements of the computational domain of theoretical physics were missing:

     

    ability to handle products and derivatives involving commutative, anticommutative and noncommutative variables and functions

    ability to perform computations taking into account custom-defined algebra rules of different kinds

    (commutator, anticommutator and bracket rules, etc.)

     

     

    Examples

     

    The Maple computer algebra environment

       

    Classical Mechanics

     

    Inertia tensor for a triatomic molecule

       

    Classical Field Theory

     

    *The field equations for the lambda*Phi^4 model

       

    *Maxwell equations departing from the 4-dimensional Action for Electrodynamics

       

    *The Gross-Pitaevskii field equations for a quantum system of identical particles

       

    Quantum mechanics

     

    *The quantum operator components of  `#mover(mi("L",mathcolor = "olive"),mo("&rarr;",fontstyle = "italic"))` satisfy "[L[j],L[k]][-]=i `&epsilon;`[j,k,m] L[m]"

       

    Quantization of the energy of a particle in a magnetic field

       

    Unitary Operators in Quantum Mechanics

     

    *Eigenvalues of an unitary operator and exponential of Hermitian operators

       

    Properties of unitary operators

     

     

    Consider two set of kets " | a[n] >" and "| b[n] >", each of them constituting a complete orthonormal basis of the same space.


    One can always build an unitary operator U that maps one basis to the other, i.e.: "| b[n] >=U | a[n] >"

    *Verify that "U=(&sum;) | b[k] >< a[k] |" implies on  "| b[n] >=U | a[n] >"

       

    *Show that "U=(&sum;) | b[k] > < a[k] | "is unitary

       

    *Show that the matrix elements of U in the "| a[n] >" and  "| b[n] >" basis are equal

       

    Show that A and `&Ascr;` = U*A*`#msup(mi("U"),mo("&dagger;"))`have the same spectrum

       

    ````

    Schrödinger equation and unitary transform

     

     

    Consider a ket "| psi[t] > " that solves the time-dependant Schrödinger equation:

     

    "i `&hbar;` (&PartialD;)/(&PartialD;t) | psi[t] >=H(t) | psi[t] >"

    and consider

    "| phi[t] > =U(t) | psi[t] >",

     

    where U(t) is a unitary operator.

     

    Does "| phi[t] >" evolves according a Schrödinger equation

     "i*`&hbar;` (&PartialD;)/(&PartialD;t) | phi[t] >=`&Hscr;`(t) | phi[t] >"

    and if yes, which is the expression of `&Hscr;`(t)?

     

    Solution

       

    Translation operators using Dirac notation

     

    In this section, we focus on the operator T[a] = exp((-I*a*P)*(1/`&hbar;`))

    Settings

       

    The Action (translation) of the operator T[a]"=(e)^(-i (a P)/(`&hbar;`))" on a ket

       

    Action of T[a] on an operatorV(X)

       

    General Relativity

     

    *Exact Solutions to Einstein's Equations  Lambda*g[mu, nu]+G[mu, nu] = 8*Pi*T[mu, nu]

       

    *"Physical Review D" 87, 044053 (2013)

     

    Given the spacetime metric,

    g[mu, nu] = (Matrix(4, 4, {(1, 1) = -exp(lambda(r)), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = exp(nu(r))}))

    a) Compute the Ricci and Weyl scalars

     

    b) Compute the trace of

     

    "Z[alpha]^(beta)=Phi R[alpha]^(beta)+`&Dscr;`[alpha]`&Dscr;`[]^(beta) Phi+T[alpha]^(beta)"

     

    where `&equiv;`(Phi, Phi(r)) is some function of the radial coordinate, R[alpha, `~beta`] is the Ricci tensor, `&Dscr;`[alpha] is the covariant derivative operator and T[alpha, `~beta`] is the stress-energy tensor

     

    T[alpha, beta] = (Matrix(4, 4, {(1, 1) = 8*exp(lambda(r))*Pi, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 8*r^2*Pi, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 8*r^2*sin(theta)^2*Pi, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 8*exp(nu(r))*Pi*epsilon}))

    c) Compute the components of "W[alpha]^(beta)"" &equiv;"the traceless part of  "Z[alpha]^(beta)" of item b)

     

    d) Compute an exact solution to the nonlinear system of differential equations conformed by the components of  "W[alpha]^(beta)" obtained in c)

     

    Background: paper from February/2013, "Withholding Potentials, Absence of Ghosts and Relationship between Minimal Dilatonic Gravity and f(R) Theories", by P. Fiziev.

     

    a) The Ricci and Weyl scalars

       

    b) The trace of "  Z[alpha]^(beta)=Phi R[alpha]^(beta)+`&Dscr;`[alpha]`&Dscr;`[]^(beta) Phi+T[alpha]^(beta)"

       

    b) The components of "W[alpha]^(beta)"" &equiv;"the traceless part of " Z[alpha]^(beta)"

       

    c) An exact solution for the nonlinear system of differential equations conformed by the components of  "W[alpha]^(beta)"

       

    *The Equivalence problem between two metrics

     

     

    From the "What is new in Physics in Maple 2016" page:

      

    In the Maple PDEtools package, you have the mathematical tools - including a complete symmetry approach - to work with the underlying [Einstein’s] partial differential equations. [By combining that functionality with the one in the Physics and Physics:-Tetrads package] you can also formulate and, depending on the metrics also resolve, the equivalence problem; that is: to answer whether or not, given two metrics, they can be obtained from each other by a transformation of coordinates, as well as compute the transformation.

    Example from: A. Karlhede, "A Review of the Geometrical Equivalence of Metrics in General Relativity", General Relativity and Gravitation, Vol. 12, No. 9, 1980

       

    *Equivalence for Schwarzschild metric (spherical and Krustal coordinates)

       

    Tetrads and Weyl scalars in canonical form

     

     

    Generally speaking a canonical form is obtained using transformations that leave invariant the tetrad metric in a tetrad system of references, so that theWeyl scalars are fixed as much as possible (conventionally, either equal to 0 or to 1).

     

    Bringing a tetrad in canonical form is a relevant step in the tackling of the equivalence problem between two spacetime metrics.

    The implementation is as in "General Relativity, an Einstein century survey", edited by S.W. Hawking (Cambridge) and W. Israel (U. Alberta, Canada), specifically Chapter 7 written by S. Chandrasekhar, page 388:

     

     

    `&Psi;__0`

    `&Psi;__1`

    `&Psi;__2`

    `&Psi;__3`

    `&Psi;__4`

    Residual invariance

    Petrov type I

    0

    "<>0"

    "<>0"

    1

    0

    none

    Petrov type II

    0

    0

    "<>0"

    1

    0

    none

    Petrov type III

    0

    0

    0

    1

    0

    none

    Petrov type D

    0

    0

    "<>0"

    0

    0

    `&Psi;__2`  remains invariant under rotations of Class III

    Petrov type N

    0

    0

    0

    0

    1

    `&Psi;__4` remains invariant under rotations of Class II

     

     

    The transformations (rotations of the tetrad system of references) used are of Class I, II and III as defined in Chandrasekar's chapter - equations (7.79) in page 384, (7.83) and (7.84) in page 385. Transformations of Class I can be performed with the command Physics:-Tetrads:-TransformTetrad using the optional argument nullrotationwithfixedl_, of Class II using nullrotationwithfixedn_ and of Class III by calling TransformTetrad(spatialrotationsm_mb_plan, boostsn_l_plane), so with the two optional arguments simultaneously.

     

    The determination of appropriate transformation parameters to be used in these rotations, as well as the sequence of transformations happens all automatically by using the optional argument, canonicalform of TransformTetrad .

     

    restart; with(Physics); with(Tetrads)

    `Setting lowercaselatin letters to represent tetrad indices `

     

    0, "%1 is not a command in the %2 package", Tetrads, Physics

     

    0, "%1 is not a command in the %2 package", Tetrads, Physics

     

    [IsTetrad, NullTetrad, OrthonormalTetrad, PetrovType, SimplifyTetrad, TransformTetrad, e_, eta_, gamma_, l_, lambda_, m_, mb_, n_]

    (7.4.1)

    Petrov type I

       

    Petrov type II

       

    Petrov type III

       

    Petrov type N

       

    Petrov type D

       

     

     

    Physics_2016_IOP_webinar.mw     Physics_2016_IOP_webinar.pdf


    Edgardo S. Cheb-Terrab
    Physics, Differential Equations and Mathematical Functions, Maplesoft

    First 58 59 60 61 62 63 64 Last Page 60 of 297