A regular expression (shortened as regex or regexp; also referred to as rational expression) is a sequence of characters that specifies a search pattern. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation. It is a technique developed in theoretical computer science and formal language theory.
The concept arose in the 1950s when the American mathematician Stephen Cole Kleene formalized the description of a regular language. The concept came into common use with Unix text-processing utilities. Different syntaxes for writing regular expressions have existed since the 1980s, one being the POSIX standard and another, widely used, being the Perl syntax.
Regular expressions are used in search engines, search and replace dialogs of word processors and text editors, in text processing utilities such as sed and AWK and in lexical analysis. Many programming languages provide regex capabilities either built-in or via libraries, as it has uses in many situations.
So this is my first quantum mechanics class and so far we have spent about a month (well 3 weeks) on just the mathematics.
So in my book, the author explores the ideas presented by the stern gerlach experiment. It related the beam of silver atoms traveling through the separators to light...
Homework Statement
Let C_{X}=T(\partial S/\partial T)_{X} with X=p~or~V. Show that C_{p}-C_{V}=T(\partial S/\partial V)_{T}(\partial V/\partial T)_{p}.
Homework Equations
C_{p}-C_{V}=T[(\partial S/\partial T)_{p}-(\partial S/\partial T)_{V}]
The Attempt at a Solution
I honestly don't know...
When dealing with electrodynamics it is usual to use complex variables for the electromagnetic field while taking into account that the electromagnetic field is real and that at the end one has to take the real part of the complex solution for the field. However, what happens to compound...
Homework Statement
Expand and simplify algebraic expressions.
Homework Equations
(2a+1)(3a-1)(a-2)
The Attempt at a Solution
The problem is, we normally always do these problems with only two sets of brackets. I tried just multiplying each number will each other number but it...
I've been beating my head against this problem for hours. I see numerically that two expressions are equal, but I can't prove it:
(J^{T}R^{-1}J + P^{-1})^{-1}J^{T}R^{-1}
=
PJ^{T}(JPJ^{T} + R)^{-1}
J is arbitrary size, P and R are square though not necessarily equal. Can anyone...
Please see attached. This is a general question for a more complex thermo problem, but it fits this form. Are there any tricks to getting expressions out of square roots in solving DEs?
y=y(x)
x=x(t)
I want to get y by itself so I can integrate with respect to x, but it is trapped in a...
I wanted to know if there are any rules for interpreting mathematical expressions. If we succeed in interpreting a mathematical expression as a physical reality we will make math more friendly and very interesting. What are the rules for interpreting math expressions?
Homework Statement
So I am a little rusty on my basic math and I am trying to simplify this expression. In case you were curious the expression came from a signal block diagram that I calculated the transfer function H(z) to then found the frequency response H(f) and I think i have done that...
take this derivation
\hbar c = GM^2
multiply c^4 on both sides
\hbar c^5 = GM^2c^4
rearrange
\frac{\hbar c^5}{G} = M^2c^4
Take the square root makes
\sqrt{\frac{\hbar c^5}{G}} = E
Now this \sqrt{\frac{\hbar c^5}{G}} expression inside the radical expression is...
I read the forum rules regarding posting strictly in the format laid out; I hope this is a legitimate post. Thanks for understanding!
Homework Statement
As a Calculus II student in high school, I have been in increasing need of a means to create calculus expressions that can be emailed or...
Homework Statement
Derive the expressions for the i_r and i_θ components of velocity and acceleration.
Homework Equations
r=|r|i_r
\omega=\frac{dr}{dt}
\alpha=\frac{dω}{dt}=\frac{d^2r}{dt}
The Attempt at a Solution
r=|r|i_r
\omega=\frac{dr}{dt}i_r+r\frac{di_r}{dt}...
Hello all!
I am getting into the electromagnetic waves section in my optics class and in some of these derivations, they are using expressions that I cannot remember how they were derived or the context of them. My book from my E&M class I took awhile back is currently at my house and I am at...
Hi
People usually write the (total) polarization like this
P(t) = \epsilon_0(\chi^{(1)}E(t)+chi^{(2)}E(t)^2+\ldots)
where χ is the susceptibility. But in my book I see they write it like this
P(t) = \varepsilon _0 \frac{1}{{2\pi }}\int\limits_{ - \infty }^\infty {\chi ^{(1)}...
In my research project I arrived at a particular case where the energy spectrum is given by the following transcendental equation
\sqrt{-\frac{E}{E+V_D}}=\tan\frac{a\sqrt{\frac{2m}{\hbar^2}(E+V_D)}}{2}
In the literature I found the equivalent expression below
\cot...
As it turns out, this first part was an extremely pervasive user error that I have not seen for days. Still, though, it is interesting that equations can be factored in many different ways, so I will post that here instead:
3x^3 = -5x^2 +2x
-3x^3 -5x^2 + 2x = 0
Factored: x(-3x+1)(x+2) and...
I would like to check my answers...
Homework Statement
Given nonzero vectors u, v, and w, use dot product and cross product notation to describe the following.
A vector orthogonal to u X v and u X w
A vector orthogonal to u + v and u - v
A vector of length |u| in the direction of v...
Homework Statement
I'm sure you all know deMorgans law on simplifying boolean expressions, I just can't seem to get it. It doesn't make sense to me, like ([not]x.[not]y) = [not]x + [not]y].2. The attempt at a solution
I tried it and I don't know why it doesn't work for me ie.
([not]1.[not]0) =...
Hi all,
I am doing a program to simulate the 2D Ising Model under the metropolis algorithm. In order to check my results I would like to compare them with the analytical expressions for the mean energy, magnetization, specific heat and magnetic susceptibility.
I already found the...
Hi all,
I am doing a program to simulate the 2D Ising Model under the metropolis algorithm. In order to check my results I would like to compare them with the analytical expressions for the mean energy, magnetization, specific heat and magnetic susceptibility.
I already found the...
hey guys!I really need help in getting from the real classical solution of the Klein Gordon equation to the expression of operators!
I start from:
\varphi(x) = \int \frac{d^3 k}{(2\pi)^3 2\omega} [a(\textbf{k}) e^{ikx} + a^{*}(\textbf{k}) e^{-ikx}]
and should arrive with
\int d^3 x \...
Homework Statement
This isn't really a homewrok/coursework question, but I didn't know where to put it. I'm trying to teach myself python over the summer and I seem to have got stuck on regular expressions. I want to read a .txt file with data for various kinds of swallows, laden/unlden...
Dear all,
Please help me to prove the Fourier expansion for three different cases as follows. I need some help to show that L.H.S = R.H.S
Case1: when m not equal to 0 and n not equal to 0.
dU^0/dz (1- x/a) - dU^a/dz (x/a) = -(2/m^2 Pi^2)(1- Cos[m*Pi]) [dUn^0/dz - dUn^a/dz]
Case2...
I recently found out that every LaTeX expression I type is displayed in a new line. I had to search https://www.physicsforums.com/showthread.php?t=499624" tread or any of its links.
May I suggest that how to type inline expressions be included in the LaTeX learning material? It would be...
Homework Statement
If f(x) can be differentiated, find expressions for the derivatives of the following functions.
a) g(x) = f(x6)
b) h(x) = [ f(x)]6
c) f(x) = x2/ f(x)
The Attempt at a Solution
a)
b) Use the product rule first then multiply that expression by the expression for...
When we say that two algebraic expressions, f(x_1,x_2,\cdots x_n), g(x_1,x_2,\cdots x_n) are identical, or
f(x_1,x_2,\cdots x_n)\equiv g(x_1,x_2,\cdots x_n), we mean (according to my textbook) that \forall x_1,x_2,\cdots x_n: f(x_1,x_2,\cdots x_n)=g(x_1,x_2,\cdots x_n)
However, does that mean...
Wasn't sure of where the most appropriate place would be for this post.
If you have a truth table, say for inclusive OR, then you get a
sums-of-products expression:
(A * B^c) + (A^c * B) + (A * B)
From this, how could I arrive at the following:
A + B = ((A + B)^c)^c = (A^c * B^c)^c...
I'm not seeing how you get 1/4k = (1/2)k(1/2)k(1/2)
I understand why you can factor out the (1/2). It's in each term of the sum.
http://i111.photobucket.com/albums/n149/camarolt4z28/Untitled-2.png?t=1297227186
I haven't really looked at this crap in four years.
I would like to start by saying that I'm not at school, I'm 40 years old, and learning calculus for the first time - personal, private study - so anyone helping me out won't be giving me the answers to any course work or school work. I don't have a teacher, and there's no one I can ask who can...
Could somebody help me in deriving the following expressions?
I can judge that the first equation is a common expression for finding Keq for a mass-spring system in series.. Can't do the rest :/ anybody please ?
Thanks in advance.
Hi, is there a way to factor expressions in matrices? for example
In[1]:= MatrixSimplify[{{3/2, 5/2}, {9/2, 1/2}}] (*I just made up the name MatrixSimplify*)
Out[1]:= 1/2 * {{3, 5}, {9, 1}}
I tried with Simplify[] and with Factor[] but it didn't work, it seems they just simplify every...
Hi guys
I am reading a book, where they use vector expressions a lot. In it they write
{\bf{M}} = \sum\limits_{\psi ,\psi ',\sigma ,\sigma '} {\left\langle {\psi '} \right|\left\langle {\sigma '} \right|{\bf{m}}\left| \sigma \right\rangle \left| \psi \right\rangle a_{\psi ',\sigma '}^\dag...
Homework Statement
Show that the Fourier series formula F(t)=\frac{1}{2}a_{0}+\sum^{\infty}_{n=1}(a_{n}cos(nwt)+b_{n}sin(nwt)) can be expressed as F(t)=\frac{1}{2}a_{0}+\sum^{\infty}_{n=1}c_{n}cos(nwt-\phi_{n}). Relate the coefficients c_{n} to a_{n} and b_{n}.
Homework Equations
We...
i have two boolean expressions that I'm simply stuck on. (any variable with the ' mark means NOT). i used http://hopper.unco.edu/KARNAUGH1.1/Function.html" to check my answers for both..apparently they are both supposed to equal 1. i have tried solving the expressions multiple times, and each...
Homework Statement
Hey guys, having a trig brain fart here, can you point me in the direction of simplifying:
\frac{6cos\vartheta}{2sin\vartheta-3cos\vartheta}
or is it as simplified as it gets? \
Homework Equations
Thought about using double angle formula
The Attempt at a...
Homework Statement
Express in simplest form.
1/2 – 4/d divide by 1/d + 3/2d
Homework Equations
LCF
The Attempt at a Solution
I know the LCD is 2d. But would you multiply this to the equation
Homework Statement
See figure.
Homework Equations
The Attempt at a Solution
I tried breaking the circuit down into a bunch of small logic gates but I'm having a tough time putting things back together into one big circuit. (One boolean expression)
So far I've determined that...
Homework Statement
F= A'C+A'B+AB'C+BC
Express the function as sum of minterms, and find the ninimal sum of products.
Homework Equations
The Attempt at a Solution
How do I do this? I really don't know. I know it is easy though. Any help is appreciated!
Homework Statement
Σ = {a,b}
find regular expression for
1)all strings that haven't got more than 3 a's
2)all strings that have a number of a's that is divisible by 3
3)all strings that have the substring aaa only one time
The Attempt at a Solution
1) b*Ub*ab*Ub*ab*ab*Ub*ab*ab*ab*
2)...
EDIT: My apologies if I started this thread in the wrong forum!
Homework Statement
Z = P.Q.R + P.R
Where
. = AND
+ = OR
~ = NOTHomework Equations
(Commutative Law)
A+B = B+A, A.B = B.A
(Associate Law)
(A+B)+C = A+(B+C), (A.B).C = A.(B.C)
(Distributive Law)
A(B+C) = AB+AC...
Homework Statement
Simplify (\log_a{b})(\log_b{c})(\log_c{d}) in terms of \log_x{y}
Homework Equations
The Attempt at a Solution
well , the furthest i can reach is
\frac{\log_xd}{\log_xa} , how do i express in terms of \log_x{y}
Homework Statement
Find analytical expressions for the magnitude and phase of the frequency response for each G(s) below:
(a) G(s)\,=\,\frac{20}{s\,\left(s\,+\,5\right)\left(s\,+\,5\right)}(b) G(s)\,=\,\frac{2\,\left(s\,+\,5\right)}{\left(s\,+\,1\right)\,\left(s\,+\,10\right)}(c)...
Homework Statement
Ok so we have different expressions for group velocity, g...
The most obvious being g = dw/dk
But then the text I am using says sinve w=vk we can write
g = v+k dv/dk
alongside other expressions, including k etc..
My question is - what is v in the equation...
Homework Statement
Simplify/Evaluate these expressions involving the Kronecker delta, using Einstein's summation convention:
a)\delta_{qr}\delta_{rp}\delta_{pq}
b)\delta_{pp}\delta_{qr}\delta_{rq}
Homework Equations
\delta_{ij}=0 when i =/= j
\delta_{ij}=1 when i = j
The Attempt at...
Homework Statement
express cosh(z) in terms of functions with real variable only, hence find all complex zeroes and mark on argand diagram.
The Attempt at a Solution
I did cosh(z)=cosh(x+iy) then got down to cosh(z)=cos(x)cos(y)-sin(x)sin(y)... can anyone confirm this please? also i got...
Homework Statement
Okay so I've been deriving various expressions for the group velocity starting with
g=dw/dk
then g=v+kdv/dk
also g=v-lambda dv/dlambda (*)
then finally g=c/u(1+lambda/u (du/dlambda))
Ok so finally I am asked to use equn (*) to derive the following expression...
Hello,
I want to express Non-Deterministic Turing Machine constraint with boolean expression.
The constraint is: "Cells which aren’t being read remain the same at time t+1".
lets say H[i,j] means the read/write head at time i at cell j
and S[i,j,k] means the symbol k at time i in cell j
so the...
I got the following 2 questions in a recent maths test. Can anyone please explain the correct way to simplify these expressions?
4u to the power of 3 v to the power of 6 / 8u to the power of 2 v to the power of 3
3x to the power of 6 y to the power of 5 z to the power of 3 / 9x to the...
f(x) = x/x
g(x) = 1
so... those are different functions? i don't know how to treat expressions like that.
When expression is not defined for some x=a, but after some algebraic transformations i get expresion defined for x=a ... what happends?
Can i make algebraic transformations on...
Homework Statement
(a -b) \cdot (b - c) \times (c - a)
Homework Equations
The Attempt at a Solution
Honestly I have no idea where to being. I believe this expression is a scalar triple product but I do not know how to use the properties to simplify this expression.
Sorry, kind...
Homework Statement
Suppose that a hole is drilled through the center of Earth to the other side along its axis. A small object of mass m is dropped from rest into the hole at the surface of Earth, as shown above. If Earth is assumed to be a solid sphere of mass M and radius R and friction is...