More complicated calculations
Notice the equal ":=" sign that implies a delay calculation, and the underscore "_" sign that implies the independent variable.
Plot a function
Make sure that you do not mix the "( ), { } and [ ]" brackets. MATHEMATICA gets confused and it will send you an error message.
Find the zeros
Notices "==" logical sign that determines equality.
We can take the derivative of the function:
or
Derivative calculated at a particular value
Derivative[1][f][A]
We have to tell MATHEMATICA to erase from memory defined constants or functions
or
Integration
in1=NIntegrate [ Sin [Sin[x]], {x, 0, Pi} ]
or
Relevant integrals in the case of the particle in the box. Here we use regular integration and also we considered a useful mathematical technique to find integrals.
We need to consider some substitutions using the "/." command
or we can include the conditions in the Simplify command
Simplify[{i0,i1,i2},{n} ∈ Integers]
Notice that "/. tells MATHEMATICA to substitute and that the actual substitution is given by the arrow command ->"and multiple substitution are enclosed by a curly bracket and separated by commas.
Finally consider the following integral:
One way of simplify is by using conditions
Simplify[i10,{n} ∈ Integers]
or a direct substitution
A relevant application in Quantum Mechanics
First we consider the integral of the square of the wave function
Since α is a positive real number the integral is equal to unity. Thus we say that psiH10 is normalized.
Simplify[norm10[[2]],α > 0]
Now we take the derivative of the wave function
The average <> is proportional by the following integral:
Notice that we can include Assumptions in the Integrate command
Created by Mathematica (September 7, 2006) | ![]() |