Mathematica doesn’t recognize that $displaystyle Wleft( e^{e+1}right) =e$ and it’d be really nice if it did.
Is there any way to ‘teach’ it to treat ProductLog (E^(E+1)) as e so that it will simplify outputs as such?
Mathematica doesn’t recognize that $displaystyle Wleft( e^{e+1}right) =e$ and it’d be really nice if it did.
Is there any way to ‘teach’ it to treat ProductLog (E^(E+1)) as e so that it will simplify outputs as such?
After thinking for a bit, I am not able to prove a double inclusion proof for the following problem. It seems very interesting to me.
Consider the regular expression $r= ((1(00)^∗1 + 0)1)^∗$ and the right-linear grammar $G= ({S,A},{0,1},S,P)$, where $P$ consists of the following rules:
$Srightarrow 1A|01S|lambda$
$Arightarrow 00A|11S$
Prove that $L(G)subseteq L(r)$ and vice versa.
We express the radiation from a source by the expression bellow:
$U(x,y)=frac{e^{jkz}e^{frac{k}{2z}(x^2+y^2)}}{jlambda z}iint_{-infty}^{+infty}u(x’,y’)e^{-jfrac{2pi}{lambda z}(x’x+y’y)}dx’dy’ $
the fourier transform is $f_x=frac{x}{lambda z}$ and $f_y=frac{y}{lambda z}$.
Our system bellow has two apartures which has distance between them.
each aparture has fourier transform of sinc $F(rect(ax)rect(by))=frac{1}{|ab|}sinc(frac{f_x}{a})sinc(frac{f_y}{b})$.
$F(delta(f_x-frac{a}{2},f_y-frac{b}{2}))=e^{(ipi(ax+by))}$.
I know that convolution with delta is a shift in space.
how to find using the integral expression shown above the fourier transform of the shape bellow?
Thanks.
I cannot use mathematica properly so forgive me for the following post:
I want to calculate values of following sum for large $x$:
$$sum_{pleq x} frac{1}{sqrt{ep}-1}$$
Where e is Euler’s constant.
Also I like to get plot and asymptotic of this sum.
I want to create a Pattern regular expression in a webform email element to reject form submission if user input in email element/field @gmail.com or @yahoo.com or @hotmail.com etc
Pattern like here
^(?=.*?b@gmail.comb).*$
I have a method in a service that performs a Linq-to-SQL query:
public async Task<IEnumerable<Incident>> GetIncidentsAsync<TOrderBy>(
Expression<Func<Incident, bool>> whereExpression,
Expression<Func<Incident, TOrderBy>> orderByExpression
)
{
return await (
from i in _context.Incidents
// inner join
.Include(i => i.IncidentType)
.Where(whereExpression)
.OrderBy(orderByExpression)
// left-outer join
join ft in _context.Driver on i.FaultTypeId equals ft.Id into ift
from faultTypes in ift.DefaultIfEmpty()
// left-outer join
join v in _context.Vehicles on i.VehicleSerialNo equals v.VehicleSerialNo into iv
from vehicles in iv.DefaultIfEmpty()
select new Incident
{
Id = i.Id,
IncidentTypeId = i.IncidentTypeId,
IncidentType = i.IncidentType,
// datetimes
Occurred = i.Occurred,
Reported = i.Reported,
Resolved = i.Resolved,
//
VehicleSerialNo = i.VehicleSerialNo,
Vehicle = vehicles,
//
DriverSerialNo = i.DriverSerialNo,
Driver = drivers
}
).ToListAsync();
}
Improvements:
Incident
to be returned feels like an anti-patternwhereExpression
is null; this will try an exception noworderByExpression
is null; this will try an exception noworderByExpression
(if this is possible)<TOrderBy>
?Part of your confusion stems from the fact that there are two different formulations of Arden’s Lemma, which I’ll call LR and RL. To illustrate them, let’s take a simple FA with three states, $P,Q,R$, where $P$ is the start state and $R$ is the only final state. The transitions are
$$begin{array}{c|cc}
& 0 & 1\ hline
P & Q & varnothing\
Q & R & Q\
R & R & R
end{array}$$
It’s clear with a moment’s thought that the language accepted by this FA is denoted by the regular expression $01^*0(0+1)^*$, so let’s see what the two versions of Arden’s Lemma produce.
LR: In this version we generate the regular expression from left to right. If we have a state $X$ with a transition on $a$ to state $Y$ we will include the equation $X=aY$, along with any other terms that arise from transitions from $X$ to other states. Along with this, we add a “$+epsilon$” to the expression for $X$ if $X$ happens to be a final state. Having made the collection of equations, we may apply the simplification rule that says that whenever we have $X=rX + s$ for regular expressions $r, s$ we can replace the equation by its solution $X=r^*s$. Note that here the goal is to product a regular expression for the start state.
In the example above, we’ll have the equations
$$begin{align}
P&=0Q\
Q&=0R+1Q\
R&=(0+1)R+epsilon & text{since R is final}
end{align}$$
Substituting, we see that $R=(0+1)^*epsilon = (0+1)*$ and $Q=1^*(0R)=1^*0(0+1)^*$, and finally $P=0Q=01^*0(0+1)^*$, as we expected.
RL: In this version we construct the regular expression from right to left. The difference is that if we have a state $X$ with transition on $a$ to state $Y$ we include the equation $Y=Xa$, along with any similar terms. In this case, we add the “$+epsilon$” only to the start state’s equation and the substitution in this case says that if we have $X=Xr+s$ we have the solution $X=sr^*$.
Returning to our example, we’ll have
$$begin{align}
P&=epsilon & text{since $P$ is the start state and has no incoming transitions}\
Q&=P0+Q1\
R&=Q0+R(0+1)
end{align}$$
Now our goal is just opposite of what we had in the LR version: we want an expression for the final state, $R$. Working from the top down we have $Q=Q1+P0=Q1+0$ so $Q=01^*$ and $R=Q0(0+1)^*=01^*0(0+1)^*$: the same result generated in a different order.
Assuming you want to use the LR version, your equations should be
$$begin{align}
a_1&=0a_2\
a_2&=0a_3+1a_5+epsilon\
a_3&=0a_3+1a_4+epsilon\
a_4&=0a_3+1a_4\
a_5&=0a_6+1a_5\
a_6&=0a_6+1a_5+epsilon
end{align}$$
As for your problem with $a_5, a_6$, for example, we could do this:
$$begin{align}
a_5 &= 1^*(0a_6)=1^*0a_6 & text{Arden}\
a_6 &= 0^*(1a_5+epsilon) &text{Arden again, now substitute $a_6$}\
a_5 &= 1^*0(0^*(1a_5+epsilon))\
&= (1^*00^*1)a_5+1^*00^* &text{so we have}\
a_5 &= (1^*00^*1)^*1^*00^*
end{align}$$
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed
3 times
alphan = 1.72*10^(-4);
alphap = 2.037*10^(-4);
L = 1.3*10^(-3);
A = 2.08*10^(-6);
kp = 1.265;
kn = 1.011;
sigmap = 1.314*10^(-5);
sigman = 1.119*10^(-5);
alpha = alphap - alphan;
RTeg = L/(A)*(sigmap + sigman); KTeg = (A/L)*(kp + kn);
Prhf = 1.45; Prcf = 7; nucf = 10^(-6); nuhf = 0.294*10^(-6);
Rehf = Vhf*H/nuhf; Recf = Vcf*H/nucf; kcf = 0.5861; khf = 0.6613;
Nuhf = 0.023*Rehf^(0.8)*Prhf^(0.4); Nucf = 0.023*Recf^(0.8)*Prcf^(0.4);
hhf = Nuhf*khf/H; hcf = Nucf*kcf/H; Lhs = 5*10^(-3);
Whs = 1.5*10^(-3); Abhs = Lhs*Whs;
rhohf = 965.31; Vhf = 0.0058/(rhohf*Whs*H); mhf =
rhohf*Vhf*Whs*H; rhocf = 998.21; Vcf = 0.0058/(rhocf*Whs*H); mcf =
rhocf*Vcf*Whs*H; cph = 4205; cpc = 4153; n = 1;
Thfin = 200 + 273;
Tcfin = 20 + 273;
ZT = 1;
alpha = 0.2227372967 e - 3;
I1 = alpha*(Th - Tc)/(2*RTeg);
Qh1 = mhf*cph*(Thfin - Thfout);
Qh2 = hhf*Abhs*((Thfin + Thfout)/2 - Th);
Qh3 = alpha*Th*I1 + KTeg*(Th - Tc) - 1/2*I1^2*RTeg;
Qc1 = alpha*Tc*I1 + KTeg*(Th - Tc) + 1/2*I1^2*RTeg;
Qc2 = hcf*Abhs*(Tc - (Tcfin + Tcfout)/2);
Qc3 = mcf*cpc*(Tcfout - Tcfin);
Eq1 = Qh1 == Qh2;
Eq2 = Qc2 == Qc3;
s1 = (Solve({Eq1, Eq2}, {Thfout, Tcfout}));
Tcfout = Tcfout /. s1;
Thfout = Thfout /. s1;
Eq3 = Qh1 == Qh3;
Eq4 = Qc1 == Qc3;
s2 = Solve({Eq3, Eq4}, {Th, Tc});
Tc = Tc /. s2;
Th = Th /. s2;
eta = (1 - Tc/Th)*(Sqrt(1 + ZT) - 1)/(Sqrt(1 + ZT) + Tc/Th)
This final expression eta
is in a very complicated form. Is there a way to simplify it further?
$endgroup$
lang-mma
Let $(p,q) in Delta_2$ and $(k,m) in Delta_2$, where
$Delta_2$ is the 2-simplex, that is,
$0leq pleq 1$, $0leq qleq 1$, and $0leq 1-p-qleq 1$.
Consider the expression
2 (p - q) + 3 k^2 (-1 + 2 p + q) +
k (1 + 6 (-1 + m) p + (3 - 6 m) q) -
m (1 + 3 p - 6 q + 3 m (-1 + p + 2 q))
I want to find the values that the expression above can take, given the
conditions on p
, q
, m
, and k
.
I tried an approach using Interval
expression(p_, q_, m_, k_) :=
2 (p - q) + 3 k^2 (-1 + 2 p + q) +
k (1 + 6 (-1 + m) p + (3 - 6 m) q) -
m (1 + 3 p - 6 q + 3 m (-1 + p + 2 q))
and observing the values that it takes
substitute($p_, $k_) :=
N((2 (p - q) + 3 k^2 (-1 + 2 p + q) +
k (1 + 6 (-1 + m) p + (3 - 6 m) q) -
m (1 + 3 p - 6 q + 3 m (-1 + p + 2 q)) /. {p -> $p,
k -> $k}) /. {q -> Interval({0, 1 - $p}),
m -> Interval({0, 1 - $k})})
then
Manipulate(substitute(p, q), {p, 0, 1, 1/10}, {q, 0, 1, 1/10})
However, using this values in the original expression, return lower values:
Table(expression(0, i, j, 0), {i, 0, 1, .1}, {j, 0, 1, .1}) //
Flatten // MinMax
Can’t use output sin[p] since Sin[p] is expected.
As a result of D[x, u] D[x, u] + D[y, u] D[y, u] + D[z, u] D[z, u] I’ve got a Mathematica output like u²+v²cos[p]² + v²sin[p]². As you see, cos and sin are given in lowercase letters, and Mathematica can’t use the expression for further simplifications since Cos and Sin are expected. What can I do to get the expected solution u²+v²?