## calculus – Partial integration question about LIATE rule?

LIATE rule
A rule of thumb has been proposed, consisting of choosing as u the function that comes first in the following list:

L – logarithmic functions:
I – inverse trigonometric functions:
A – algebraic functions:
T – trigonometric functions:
E – exponential functions:

The function which is to be dv is whichever comes last in the list: functions lower on the list have easier antiderivatives than the functions above them. The rule is sometimes written as “DETAIL” where D stands for dv.
https://en.wikipedia.org/wiki/Integration_by_parts#:~:text=In%20calculus%2C%20and%20more%20generally,of%20their%20derivative%20and%20antiderivative.

My question is does this rules always works ?

Posted on Categories Articles

## summation – Algorithm used by Mathematica for evaluating partial sums

Today, while using mathematica, I entered the command `Sum(1/Factorial(n), {n, 0, x})` and found that:
$$sum_{xgeq ngeq0}frac{1}{n!}=frac{eGamma(x+1,1)}{Gamma(x+1)}$$
Where $$Gamma(x,y)$$ is the Incomplete Gamma function.
It is well known that
$$sum_{xgeq0}frac{1}{n!}=e$$
But which algorithm(or formula) did Mathematica use? If the algorithm is too complex for human use, how can we prove the first equality?
Another result it gave was
$$sum_{mgeq ngeq 1}frac{1}{n,n!}=frac{(mathrm{Ei}(1)-gamma)m(m+1)!+(mathrm{Ei}(1)-gamma)(m+1)!-_2F_2(1,m+1;m+2,m+2;1)}{(m+1)(m+1)!}$$
Where $$mathrm{Ei}$$ is the Exponential integral and $$F$$ is the Generalized hypergeometric function. This looks very hard to evaluate by hand, is there any formula or algorithm to evaluate this? I shouldn’t say this on MSE, but I don’t know how to do this, I can’t do even a step.

Posted on Categories Articles

## calculus and analysis – Partial derivative of an integral

I have the following function (it is the incomplete elliptic integral of first kind)
$$F(b,g) = int_{0}^{b} frac{dx}{sqrt{(1-x^2)(1-gx^2)}}$$
I would like to compute
$$frac{partial F}{partial g} , frac{partial F}{partial b} , frac{partial^2 F}{partial g^2} , frac{partial^2 F}{partial b^2} , frac{partial^2 F}{partial bpartial g}$$
so I defined

``````F(b_,g_):= Integrate(1/Sqrt((1 - x^2)*(1 - g*x^2)), {x, 0, b})
``````

and tried the command

``````D(F(b,g),g)
``````

but Mathematica cannot compute it.
Am I doing something wrong or is there a way to do it?

Posted on Categories Articles

## Numerical instabilities in a solution to a partial differential equation

I have been trying to solve a partial differential equation known as KdV (Korteweg-de Vries) equation using NDSolve.
KdV equation is written as:

$$frac{partial u(x,t)}{partial t}+frac{partial^3 u(x,t)}{partial x^3}=-6u(x,t)frac{partial u(x,t)}{partial x}$$

One of the analytical solution of this equation is a Jacobi elliptical function
$$u_{A} = text{A JacobiCN}(B*(x- c t),m)^2$$
where A, B, c and m are known parameters.

So the initial condition is
$$u_0 = text{A JacobiCN}(B*x,m)^2$$.

The boundary condition is: $$u(t,-a) = u(t,a)$$.

Code for analytical solution is

``````a = 30; m = 0.9; A = 0.9;
B = Sqrt(1.5*A) / Sqrt(2*m + m^2)
c = 6*(-A + A*m + A*m^2)/(m*(2 + m))
uA(x_,t_) := A*JacobiCN(B*(x - c*t), m)^2;
Plot(uA(x,0.5), {x, -a, a}, LabelStyle ->  Directive(14, Bold,   Black), AxesLabel -> {Style("x", 14, Bold, Black), Style("uA", 14, Bold, Black)})
``````

Plot of analytical solution for t = 0.5 When I solve the partial differential equation using NDSolve, the numerical instabilities arise and the numerical solution doesn’t match the analytical solution.

``````eq = {D(u(x, t), {t, 1}) + D(u(x, t), {x, 3}) == -6 u(x, t) D(u(x, t), {x, 1}), u(x, 0) == A*JacobiCN(B*x, m)^2, u(-a, t) == u(a, t)};
sol = Flatten@NDSolve(eq, u, {t, 0, 1}, {x, -a, a})
Plot(Evaluate(u(x, 0.5) /. sol), {x, -a, a}, LabelStyle ->  Directive(14, Bold, Black), AxesLabel -> {Style("x", 14, Bold, Black), Style("u", 14, Bold, Black)})
`````` I am also getting the warning message
`NDSolve::mxsst: Using maximum number of grid points 10000 allowed by the MaxPoints or MinStepSize options for independent variable x.`
I have tried different options and methods given in NDSolve documentation and also tried solutions given in https://mathematica.stackexchange.com/questions/9277/i-failed-to-solve-a-set-of-one-dimension-fluid-mechanics-pdes-with-ndsolve/9291#9291 but nothing seems to be working.
Following method removed the warning message but there was no improvement in the numerical solution.

``````nxy = 500;
sol = Flatten@NDSolve(eq, u, {t, 0, 1}, {x, -a, a}, Method -> {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid", "MaxPoints" -> nxy, "MinPoints" -> nxy,
"DifferenceOrder" -> "Pseudospectral"}, Method -> "Adams"}, MaxSteps -> (Infinity))
``````

Posted on Categories Articles

## cancellations – Outbound leg cancelled – Can I get a partial refund?

I have a trip booked in November with the

• outbound journey on Austrian Airlines from Zurich via Vienna to Nuremberg,

and the

• return on Lufthansa from Nuremberg via Frankfurt to Zurich.

I have been informed that the flight I was supposed to take from Zurich to Vienna has been cancelled. I could take the earlier flight, but that would result in a six-hour layover in Vienna.

As far as I am aware, I am eligible for a refund of my entire ticket due to this flight cancellation (correct me if I’m wrong). However, could I also opt to only fly the return journey, and get (roughly) half of my ticket value back? Or would the ticket be re-priced in this case for a one-way journey NUE-FRA-ZRH, which as of now would cost me significantly more than I have originally paid?

Posted on Categories Articles

## Partial Successful Action behaviour

I’m building an app where a user might perform bulk-acceptance on items (for example – shifts he’s eligible to work in). Now when the request reaches backend some items has expired.

I can think of showing this info in 2 ways :

1. Accept eligible items and show error message to user about in-eligible items(remove them from UI).
2. Ask user to refresh and sync up latest eligible items to perform action on.
Posted on Categories Articles

## Partial plaintext with pkcrack – Information Security Stack Exchange

First off, I know very little about cryptography, as I am sure my post below makes clear. The short version is I presume I need to use the -o (offset) function of pkcrack, but I’m not sure how to work out what offset I need.

I have an old .wmv file (around 65MB) that I encrypted in a zip file about 11 years ago, and I’d like to access it. It’s compressed/encrypted with ZipCrypto Deflate, according to 7Zip. There are no other files in that zip file, so I can’t do a full plaintext attack. However, the pkcrack site (https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-readme.html) mentions that a partial plaintext can work. Using Notepad to look at other .wmv files created within a few days of the encrypted file, they seem to start with the following characters: 0&²uŽfÏ¦Ù ª bÎl

However, when I save these characters in a .txt document (which I then change to .wmv – not sure if this is necessary or helpful) and compress into a zip, it doesn’t use Deflate – it uses Store, presumably because the original file is only 23 bytes. If I’ve understood properly, this shouldn’t work because both files have to be compressed with the same technique. I tried it anyway, and it a) doesn’t work (“You must have chosen the wrong plaintext”), and b) takes about 6 hours.

So I am now trying some plaintext from further in my other .wmvs, which matches across several other files. This can be compressed with Deflate, and it only takes about 15 minutes to run pkcrack, but I still get the “You must have chosen the wrong plaintext” message.

The new plaintext begins on column 123 of the .wmv file when opened in Notepad. Using an offset of 123 with the command `./pkcrack -C encrypted.zip -c encrypted.wmv -P plaintext123.zip -p plaintext123.wmv -d decrypted.wmv -a -o 123 ` doesn’t work.

And so my question, finally, is how do I find out what the offset should be? Thanks in advance for any help you can offer.

Posted on Categories Articles

## numerical integration – Error in solving a system of partial differential equations

I’m trying to a solve of system of partial differential equation, but Mathematica is giving some error. Can anyone help me please to find out the error.

``````EQ1 = (1/P*r)*D(T(y, (Tau)), {y, 2}) +
u(y, (Tau))*D(T(y, (Tau)), {y, 1}) + -2*T(y, (Tau))*
D(u(y, (Tau)), {y, 1}) - S*D(T(y, (Tau)), {(Tau), 1}) +
EE*c*(D(u(y, (Tau)), {y, 2}))^2;
EQ2 = D(u(y, (Tau)), {y, 3}) + u(y, (Tau))*D(u(y, (Tau)), {y, 2}) -
S*D(u(y, (Tau)), {y, 1}, {(Tau), 1}) - (D(
u(y, (Tau)), {y, 1}))^2;
INC1 = Derivative(1, 0)(u)(0, (Tau)) - Sin((Tau));
INC2 = T(0, (Tau)) - 1;
INC3 = u(0, (Tau));
EE = 1; c = 1; P = 1; r = 1; S = 1; NDSolve({EQ1 == 0, EQ2 == 0,
INC1 == 0, INC2 == 0, INC3 == 0}, {u, T}, {(Tau), 0, 10}, {y, -10,
10})
``````

Posted on Categories Articles

## co.combinatorics – Integer decomposition property with a partial order

Let $$mathcal{P}$$ be a convex lattice polytope in $$mathbb{R}^n$$. We say that $$mathcal{P}$$ has the integer decomposition property (or “is IDP”) if for all $$kin mathbb{N}$$ and $$alpha in kmathcal{P}capmathbb{Z}^n$$, there are $$alpha_1,ldots,alpha_k in mathcal{P}capmathbb{Z}^n$$ such that $$alpha=alpha_1+cdots+alpha_k$$. IDP polytopes are a well-studied class with connections to commutative algebra, algebraic geometry, etc.

Here’s a new/nonstandard notion. Let’s say $$mathcal{P}$$ is IDP$$leq$$ if there exists a partial order $$leq$$ on $$mathcal{P}capmathbb{Z}^n$$ such that for all $$kin mathbb{N}$$ and $$alpha in kmathcal{P}capmathbb{Z}^n$$, there is a unique multichain $$alpha_1 leq cdots leq alpha_k in mathcal{P}capmathbb{Z}^n$$ with $$alpha=alpha_1+cdots+alpha_k$$.

For example, the order polytope $$mathcal{O}(P)$$ and the chain polytope $$mathcal{C}(P)$$ of a poset $$P$$ are IDP$$leq$$ where $$leq$$ is the natural distributive lattice order (on order filters/antichains).

Question: Are there other interesting families of IDP$$leq$$ polytopes?

Motivation: this property gives a canonical/algorithmic choice of decomposition for all latice points of dilates. Also then the zeta polynomial of $$(mathcal{P}capmathbb{Z}^n,leq)$$ is the Ehrhart polynomial of $$mathcal{P}$$.

Posted on Categories Articles

## “Partial” icon in a comparison table

Personally, I would drop the icon and go with just the “Partial” text.

I would also make this a clickable link (visually al least), so it is more obvious that you can find out more information (rather than having to hover).

However, if I had to choose an icon I would go with some kind of “half filled” shape. Perhaps a square or circle depending on the rest of your design style.

Very quick example (excuse the rough edges): 