## simplifying expressions – FullSimplify is giving a condition that is implied by the assumptions

I’ve been trying to understand why `FullSimplify` is giving a condition that is implied by the assumptions (otherwise the set is empty). However, I couldn’t understand why:

``````Clear("Global`*")
l(v_) := v;
q((Beta)_, v_) := ((Beta) - n*c) /(1 + (l(v) + n^2)*c);
Assuming(a > 0 && (Beta) > 0 && c > 0 && v > 0 && n > 0 &&
c < ((Beta)*n - 1)/(l(v) + n^2*(a + 1)),
FullSimplify@Reduce(D(q((Beta), v), v) < 0))
``````

It yields:

``````c n < (Beta)
``````

The inequality is reversed if I reverse the inequality in the derivative, when I’d expect:

``````False
``````

Any ideas about what could possibly be the problem?

Posted on

## sharepoint online – Create Flow condition: If column “End_date” is less than 7days from column “Start_Date”, then

I have two “Date & Time” type columns:

Start_date
and
End_date

I would like to create a manual triggered Flow (already have button writen in JSON in place) that compares them and:

if End_date is less than one week from Start_date, I would like to e.g e-mail to be sent (an action after is not priority, I would like to check that condition in the first place).

Any suggestions?

Posted on

## differential equations – NDSolve Boundary Condition Error

I’m trying to solve a simple one-dimensional heat transfer problem for $$T(z,t)$$ with the following equation, boundary conditions, where $$k$$, $$a$$, $$h$$, $$T_s$$, $$T_m$$, and $$T_c$$ are all constants:

$$kfrac{partial T(z,t)}{partial t}=afrac{partial^2T(z,t)}{partial t^2}$$

Boundary conditions:
$$T(z=0,t)=T_s$$
$$kfrac{partial T(z,t)}{partial t}=h(T_m-T_c),z=0.005$$

Initial conditions:
$$T(z=0.005,t=0)=T_m$$
$$T(z=0,t=0)=T_s$$

I tried solving with Mathematica using the following code:

``````pde1d = D(T(z, t), t) == a*D(T(z, t), {t, 2});
bc1d1 = T(0, t) == Ts;
bc1d2 = Derivative(1, 0)(T)(0.005, t) == h(Tm - Tc)/k;
ic1 = T(0.005, 0) == Tm;
ic2 = T(0, 0) == Ts;

soln1dtest = NDSolve({pde1d, bc1d2, bc1d1, ic1, ic2},
T(z, t), {z, 0, 0.005}, {t, 0, 1000})
``````

However, I’m getting the following error: `"Boundary condition T(0.005,0)==Tm is not specified on a single edge of the boundary of the computational domain."`

I was wondering if anyone had insight into what I’m doing wrong — are my boundary or initial conditions inconsistent somehow or specified in the wrong places, or is NDSolve not equipped to handle this setup? Thanks in advance for any help!

Posted on

## microsoft excel – How can I delete a column in sheet 2 based on sheet 1 condition?

In sheet1, I have different data number in column 1. Each data has different parameter values.

I want to delete the whole column in sheet 2 corresponding to upper and lower value of sheet 1.

The upper data in Sheet 1 is d20. I want to delete corresponding whole column of d20 from sheet2. Similarly, The lower data in Sheet 1 is d2. I want to delete corresponding whole column of d2 from sheet2.

These d20 or d2 are not fixed. Sometimes d3, d4 etc value may appear instead of d20 due to sorting. I am not fixed to data, I am fixed to position. Whatever data comes to this position, I will have to delete corresponding value.

How can I do this?

enter image description here

Posted on

## data – Deletting rows of a matrix in which specific columns match a condition

Say that I have the following table:

``````{{4.95455, 10.8, 0., 0.02}, {3.43939, 7.46667, 0., 0.03}, {2.68182,5.8, 0., 0.04},
{2.22727, 4.8, 0., 0.05},{0.3,08,0.1,0.2},{0.5,1,0.2,0.4},{0.564555, -10.3617, 0.99, 0.94}}
``````

Now I want to remove every row in which: a) the first two elements of each row are above 1, and b) the second element of each row is lower than the first element of each row. I tried to search for a solution but the ones that I find are always about lists and/or removing elements that match particular values (and not conditions). Following these conditions, I would get:

``````{{0.3,08,0.1,0.2},{0.5,1,0.2,0.4}}
``````

Posted on

## google sheets – Return different value for condition in ARRAYFORMULA

I have an ARRAYFORMULA that combines text with a number.

A B
1 textA 0
2 textB 1
3 textC 2
``````=ARRAYFORMULA(A1:A3&" "&B1:B3)
``````

But if the value in the B column is 0, I want the output cell to be empty like this:

What would be the best way to do this?

I have tried adding an if statement before the arrayformula that looked something like this

=IF(B1:B3=0),” “,ARRAYFORMULA(A1:A3&” “&B1:B3)

I assume that this is checking if the entire range equals 0, but I don’t know if there is a way to check values per cell in the range.

Posted on

## linux – Error filtering 2 files using AWK for a given condition

First of all, thank you for your help. I have a problem filtering 2 files using AWK conditionals. The two files I want to filter are these one: Fasta.fa

``````>SiiA   lcl|NC_003197.2_prot_NP_463122.1_4111   100.000 100 MEDESNPWPSFVDTFSTVLCIFIFLMLVFALNNMIIMYDNSIKVYKANIENKTKSTAQNSGANDDSNPNEIVNKEVNTQDVSDGMTTMSGKEVGVYDIADGQKTDITSTKNELVITYHGRLRSFSEEDTYKIKAWLEDKINSNLLIEMVIPQADISFSDSLRLGYERGIILMKEIKKIYPDVVIDMSVNSAASSTTSKAIITTINKKVSE
``````

species_id (the file is larger and contain the name of different species)

``````**Salmonella_enterica_subsp_enterica_Infantis** >lcl|CP052796.1_prot_QJV21904.1_1
**Salmonella_enterica_subsp_enterica_Infantis** >lcl|CP052796.1_prot_QJV21905.1_2
**Salmonella_enterica_subsp_enterica_Infantis** >lcl|CP052796.1_prot_QJV21906.1_3
**Salmonella_enterica_subsp_enterica_Infantis** >lcl|CP052796.1_prot_QJV21907.1_4
**Salmonella_enterica_subsp_enterica_Infantis** >lcl|CP052796.1_prot_QJV21908.1_5
**Salmonella_enterica_subsp_enterica_Infantis** >lcl|CP052796.1_prot_QJV26199.1_6
**Salmonella_enterica_subsp_enterica_Infantis** >lcl|CP052796.1_prot_QJV21909.1_7
``````

I want to use awk so it puts in fasta.fa the name of the species if both \$2 in both files are the same in so the output in a new file will be something similar as this:

``````SiiA    **Salmonella_enterica_subsp_enterica_Typhimurium_LT2**  lcl|NC_003197.2_prot_NP_463122.1_4111   100.000 100 MEDESNPWPSFVDTFSTVLCIFIFLMLVFALNNMIIMYDNSIKVYKANIENKTKSTAQNSGANDDSNPNEIVNKEVNTQDVSDGMTTMSGKEVGVYDIADGQKTDITSTKNELVITYHGRLRSFSEEDTYKIKAWLEDKINSNLLIEMVIPQADISFSDSLRLGYERGIILMKEIKKIYPDVVIDMSVNSAASSTTSKAIITTINKKVSE
``````

The “**” are not in the file I just put them to show all of you what I am doing. I have tried this two codes but none of them give the result I expect

``````awk 'FNR==NR{a(NR)=\$0;next}{\$2=a(FNR)}1' species_id fasta.fa >> final
awk 'NR==FNR {a(\$2)=\$1; next} \$1 in a {\$3=\$4;\$2=\$3;\$2=a(\$1);\$4=\$5;\$5=\$6}1' species_id fasta.fa >> final
``````

## dnd 5e – Does Fey Passage enable a Fairy PC to escape restraints (the restrained condition)?

From the Fairy (UA) race, Fey Passage:

You can squeeze through a space as narrow as 1 inch wide.

And the rules for squeezing in basic rules:

A creature can squeeze through a space that is large enough for a creature one size smaller than it. Thus, a Large creature can squeeze through a passage that’s only 5 feet wide. While squeezing through a space, a creature must spend 1 extra foot for every foot it moves there, and it has disadvantage on attack rolls and Dexterity saving throws. Attack rolls against the creature have advantage while it’s in the smaller space.

Would this enable a Fairy PC to escape from manacles, ropes that are tied around them, etc?

Posted on

## dnd 5e – Does Fey Passage enable a Fairy PC to escape restraints(the restrained condition)?

From the Fairy (UA) race..

You can squeeze through a space as narrow as 1 inch wide.

And the rules for squeezing in basic rules..

A creature can squeeze through a space that is large enough for a creature one size smaller than it. Thus, a Large creature can squeeze through a passage that’s only 5 feet wide. While squeezing through a space, a creature must spend 1 extra foot for every foot it moves there, and it has disadvantage on attack rolls and Dexterity saving throws. Attack rolls against the creature have advantage while it’s in the smaller space.

Would this enable a Fairy PC to escape from manacles, ropes that are tied around them, etc?

Posted on

## dg.differential geometry – Necessary and sufficient curvature condition for a regular planar curve to be simple and closed

Given a smooth, $$2pi$$-periodic function $$kappa(s)$$, the associated planar curve $$gamma(s)$$ for which $$kappa(s)$$ is the (signed) curvature, is uniquely determined up to Euclidean invariance: a canonical parametrization is for example given by
$$gamma(s) = left( int_0^{s} cos phi(sigma),text{d}sigma,,int_0^{s} sin phi(sigma),text{d}sigma right),;phi(sigma) = int_0^sigma kappa(tau),text{d}tau. tag{1}$$
The goal is to determine whether $$gamma$$ is closed and simple.

In principle, parametrization $$(1)$$ suffices to check whether $$gamma$$ is closed and simple; however, the nested integrals makes this cumbersome in practice. In my case, I have a family of functions $$kappa(s)$$ as periodic orbits of a given dynamical system, and I would like to select those $$kappa$$-orbits that give rise to a simple closed curve $$gamma$$.

A priori, one could consider the total curvature $$K = int_0^{2pi} kappa(s),text{d}s$$. For a closed curve $$gamma$$, the condition $$K = 2pi$$ is necessary to avoid self-intersections. However, this condition is unfortunately not sufficient. It is straightforward to construct an example where a homotopy within a curve family for which $$K=2pi$$ induces self-intersection: Are there results from differential geometry that I can use here, is my only option to check the injectivity and periodicity of the explicit parametrization $$(1)$$?

(Related question for algebraic, non-closed curves: https://mathoverflow.net/questions/170320/conditions-for-a-parametric-curve-to-avoid-self-intersection)

Posted on