## propositional calculus – Showing existence of a formula \$psi\$ with a single variable

Let $$B,C$$ be propositions such that $$p_0$$ is their only common variable, and $$BvDash C$$.
Show that exists a proposition $$A$$ s.t. $$BvDash A$$, $$vDash A to C$$ and $$p_0$$ is the only variable appearing in $$A$$.

I tried multiple approaches, like building a satisfying model, and using completeness and soundness to move back and forth from proof statements in HPC to semantics. The only thing I can see that the bolded assumption is useful for, is that for a model $$mu$$ s.t. $$mu (B)=T$$, $$mu (C)=T$$ regardless of $$mu (p_0)$$. But I can’t see how is this useful in HPC proofs.

## calculus and analysis – Why the integration command for this function gives no answer?

I have a function `wfVAR2(r1, r2)` which has the following form:

``````wfVAR2(r1_, r2_):=-(1/(r1 r2))
2 E^(-3.99999997*10^-8 r1 - 1.24 r1^2 - 0.2379728 r1 r2 -
1.24 r2^2) π (-4.202160919 E^(
0.1189864 r1^2 +
r1 (1.999999985*10^-8 + 0.4759456 r2) + (-1.999999985*10^-8 +
0.1189864 r2) r2) +
4.202160919 E^(
0.1189864 r1^2 + 0.1189864 r2^2 + 1.999999985*10^-8 (r1 + r2)) -
2.159230221*10^-7 E^(r1 (3.99999997*10^-8 + 0.2379728 r2))
Erfi(2.899020819*10^-8 - 0.3449440534 r1 + 0.3449440534 r2) +
2.159230221*10^-7 E^(r1 (3.99999997*10^-8 + 0.2379728 r2))
Erfi(2.899020819*10^-8 - 0.3449440534 (r1 + r2)) -
2.64697796*10^-23 E^(r1 (3.99999997*10^-8 + 0.2379728 r2))
Erfi(2.899020819*10^-8 - 0.3449440534 Sqrt(r1^2 + r2^2)))
``````

when I try this

``````gVAR = Integrate(wfVAR2(r1, r2), {r2, r-r1, r+r1})
``````

it’s really amazing that I get no answer! I really don’t know what is the problem?! Any idea?

## calculus and analysis – Symmetric part of a 4th rank tensor in mathematica

Let’s define a symbolic rank 4 tensor (of dimension 3):

``````MatrixForm(symbolicRank4=Array(Subscript(a,StringJoin(ToString/@{##}))&,{3,3,3,3}))
``````

We can symmetrize this manually using the permutations you suggest:

``````MatrixForm(manualSymmetrization=Simplify(Mean(TensorTranspose(symbolicRank4,#)&/@Permutations(Range(4)))))
``````

or using the built-in `Symmetrize`:

``````MatrixForm(builtInSymmetrization=Normal(Symmetrize(symbolicRank4,Symmetric(All))))
``````

These indeed agree, and get recognized by `TensorSymmetry`

``````In(54):= builtInSymmetrization == manualSymmetrization
TensorSymmetry(builtInSymmetrization)

Out(54)= True

Out(55)= Symmetric({1, 2, 3, 4})
``````

Finally, if you care for the independent tensor components, you can use `SymmetrizedArray` directly:

``````MatrixForm(SymmetrizedArray(pos_:>Subscript(a,StringJoin(ToString/@pos)),{3,3,3,3},Symmetric(All)))
``````

The particular examples given in the post can be symmetrized as:

``````MatrixForm(Symmetrize(TensorProduct(IdentityMatrix(3),IdentityMatrix(3)),Symmetric(All)))
MatrixForm(Symmetrize(TensorProduct(Array(a,{3,3}),Array(b,{3,3})),Symmetric(All)))
``````

## multivariable calculus – Triple integral of a function with spatially-dependent coefficients

I would like to compute the following integral

$$int_Omega f(x, y, z)dOmega$$

where $$Omega$$ is an arbitrary linear tetrahedron and $$f$$ is a trilinear interpolation. As suggested by Wikipedia, $$f$$ can be written as

$$f(x,y,z)approx a_{0}+a_{1}x+a_{2}y+a_{3}z+a_{4}xy+a_{5}xz+a_{6}yz+a_{7}xyz$$

where the coefficients $$a_i$$ depend on the coordinates and scalar values associated to the eight grid points surrounding the generic point $$p(x, y, z)$$.

If the vertices of the tetrahedron lie inside a cell, then the coefficient $$a_i$$ are determined and the computation of the integral can be performed quite easily (map the generic tetrahedron to the reference tetrahedron, compute the determinant of the Jacobian, etc.).

With the term $$textit{cell}$$ I mean the eight grid points surrounding the generic point $$p(x, y, z)$$.

If the vertices of the tetrahedon are distrubuted across more than one cell, then the coefficients $$a_i$$ vary from cell to cell. So I could split the integral into the sum of the contribution on every cell. However, the domains inside the cells are not necessarily tetrahedra, so it would be necessary to subdivide the polyhedra into tetrahedra. I think that this approach is correct, however is too complicated.

Do you think a simpler approach exists to solve this integral? I would like to exclude the Monte Carlo integration because this integral has to be computed several times.

## calculus and analysis – Plot of the derivative of a function

I have a function `functionSL` as a function of `t` (`t<0`) where I want to find the extremum of the function and also find at which `t` it occurs. I took the derivative of `functionSL` with `t` which I wrote it as the function `functionSLD`.

``````d = 3;
torootL(a_?NumericQ, t_?NumericQ, zl_?NumericQ, zh_?NumericQ) := a - NIntegrate((zl y^d)/Sqrt((1 - (zl/zh)^(d + 1) y^(d + 1)) (1 + t^2 (1 - (zl/zh)^(d + 1))^-1 - y^(2 d))), {y, 0, 1}, PrecisionGoal -> 6, Method -> "GlobalAdaptive")
zs(a_?NumericQ, t_?NumericQ, zh_?NumericQ) := zl /. FindRoot(torootL(a, t, zl, zh), {zl, 0.5, 0, 1})
intSL(a_?NumericQ, t_?NumericQ, zh_?NumericQ) := NIntegrate(With({b = zs(a, t, zh)/zh}, (((-1)/(d - 1)) (zs(a, t, zh)^(2 d) (1 + t^2 (1 - (zs(a, t, zh)/zh)^(d + 1))^-1))^-1 zs(a, t, zh)^(2 d)) x^d ((1 - (b x)^(d + 1))/(1 - (zs(a, t, zh)^(2 d) (1 + t^2 (1 - (zs(a, t, zh)/zh)^(d + 1))^-1))^-1 (zs(a, t, zh) x)^(2 d)))^(1/2) - ((b^(d + 1) (d + 1))/(2 (d - 1))) x ((1 - (zs(a, t, zh)^(2 d) (1 + t^2 (1 - (zs(a, t, zh)/zh)^(d + 1))^-1))^-1 (zs(a, t, zh) x)^(2 d))/(1 - (b x)^(d + 1)))^(1/2) + (b^(d + 1)x)/((1 - (b x)^(d + 1)) (1 - (zs(a, t, zh)^(2 d) (1 + t^2 (1 - (zs(a, t, zh)/zh)^(d + 1))^-1))^-1 (zs(a, t, zh) x)^(2 d)))^(1/2)), {x, 0, 1}, MinRecursion -> 20, MaxRecursion -> 20, AccuracyGoal -> 12, PrecisionGoal -> 10, Method -> {"GlobalAdaptive", "SingularityHandler" -> Automatic})
functionSL(a_?NumericQ, t_?NumericQ, zh_?NumericQ) := ((-((1 - (zs(a, t, zh)^(2 d) (1 + t^2 (1 - (zs(a, t, zh)/zh)^(d + 1))^-1))^-1 zs(a, t, zh)^(2 d)) (1 - (zs(a, t, zh)/zh)^(d + 1)))^(1/2)/(d - 1)) + intSL(a, t, zh) + 1)/(4 zs(a, t, zh)^(d - 1))
functionSLD(t_) := Evaluate(Derivative(0, 1, 0)(functionSLL)(0.01, t, 1))
``````

I took some sample values of `functionSLD` for some `t`,

``````In(44):= functionSLD(0)

Out(44)= -3.58024*10^-12

In(48):= functionSLD(-10)

Out(48)= 0.15527

In(90):= functionSLD(-15)

Out(90)= 0.0477369

In(91):= functionSLD(-16)

Out(91)= 0.041289

In(93):= functionSLD(-16.5)

Out(93)= 0.039934

In(59):= functionSLD(-17) // Quiet

Out(59)= 0.0424448

In(60):= functionSLLP(-17.5)

Power::infy: Infinite expression 1/0. encountered.

NIntegrate::izero: Integral and error estimates are 0 on all integration subregions. Try increasing the value of the MinRecursion option. If value of integral may be 0, specify a finite value for the AccuracyGoal option.

NIntegrate::izero: Integral and error estimates are 0 on all integration subregions. Try increasing the value of the MinRecursion option. If value of integral may be 0, specify a finite value for the AccuracyGoal option.

Power::infy: Infinite expression 1/0. encountered.

NIntegrate::izero: Integral and error estimates are 0 on all integration subregions. Try increasing the value of the MinRecursion option. If value of integral may be 0, specify a finite value for the AccuracyGoal option.

General::stop: Further output of NIntegrate::izero will be suppressed during this calculation.

Power::infy: Infinite expression 1/0. encountered.

General::stop: Further output of Power::infy will be suppressed during this calculation.

FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances.

FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances.

FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances.

General::stop: Further output of FindRoot::lstol will be suppressed during this calculation.

FindRoot::jsing: Encountered a singular Jacobian at the point {zl} = {0.825567}. Try perturbing the initial point(s).

FindRoot::jsing: Encountered a singular Jacobian at the point {zl} = {0.825567}. Try perturbing the initial point(s).

FindRoot::jsing: Encountered a singular Jacobian at the point {zl} = {0.825567}. Try perturbing the initial point(s).

General::stop: Further output of FindRoot::jsing will be suppressed during this calculation.

In(61):= functionSLD(-17.5) // Quiet

Out(61)= \$Aborted
``````

I expect `functionSL` to have an extremum for at least two values (looking only at `t<0`) so that `functionSLD` has at least two roots, I think I got one root at `t=0` which is clear in the plot of $$frac{dS}{dt}$$ and it really confirms my expectations, the other is located somewhere else (it seems clear in the plot).

You can see that at `t=0`, `functionsSLD = -3.58024*10^-12` which is essentially zero, as `t` goes to lower values `functionSLD` rises and then goes down again and it looks like it is going to be essentially zero again but as you can see at `t=-17.5` I aborted the calculation (in the sample values of `functionSLD`) because it just takes so long and it seems like there is a problem.

In the end, what I want to see is a plot of `functionSLD(t)` vs. `t` ($$frac{dS}{dt}$$).

I would also like somebody to check my `NIntegrate Rules` if there is something wrong with it, or can it be improved. I added a singularity handler because an error occurred which I pasted in the above sample values code.

## calculus and analysis – 1D Transient Heat Conduction Problem

I could really use some help with this problem regarding heat conduction through a steel bar

Solve the one-dimensional transient heat conduction problem as follows.
You insert a steel bar that had been sitting at room temperature at 72ºF into a
bed of hot coals at 800 ºF to a depth of 6 inches. The bar is 4 ft long and has a
diameter of 0.5 in. You keep the bar in the hot coals while you are holding on to
the end. How long before the temperature of the point where you are holding the
bar (5 inches from the end of the bar) reaches 130 ºF when you can no longer
hold on to the bar because it is too hot? Plot the temperature profile along the
length of the rod at that time. The bar is made of mild steel with the properties as follow:
`Thermal conductivity (k) in Btu/hr ft ºF = 26.0`
`Density (rho) in lbm/in3 = 0.284`
`Specific Heat (C) in Btu/lbm ºF = 0.122`

Any help with how to do this in Mathematica is appreciated, thanks!

## calculus and analysis – Fourier Series of ODE

I am having trouble finding the Fourier series of a 2nd order ODE. Should I be using the piecewise function as well to set up the range for t?

Solve 𝑦′′ + 𝜔^2𝑦 = 𝑟(𝑡), where 𝑟(𝑡) = |𝑡|, -𝜋 < 𝑡 < 𝜋 using Fourier series

So far I have set up the ode and set equal to r(t)
`r(t)=y''(t)+omega^2*y(t)`
`Plot(r(t),{t,-Pi,Pi})`
Any help with the mathematica code would be greatly appreciated. How can I find An, Bn with the function being an ODE

## lambda calculus – Fixed Point Combinator Turing proof

I have to proof that Turing’s combinator is a fixed point operator, but I can’t get it. I tried this:

begin{align*} Vg &= (UU)g = ((lambda f.lambda x.x(ffx)) (lambda f.lambda x.x(ffx)))g = (lambda x.x((lambda f.lambda x.x(ffx))(lambda f.lambda x.x(ffx))x))g\ &= g((lambda f.lambda x.x(ffx))(lambda f.lambda x.x(ffx))x)g \&= g(UUx)g = gVxg end{align*}
The problem is that I’m getting an extra $$x$$ at the final. Did I make a mistake while doing beta reduction?

Any help will be appreciated.

## Do connection and message coexist in CSP / Pi calculus?

Berkely Socket API has two different kinds of network sockets:

• byte stream sockets: connection-oriented and message-less
• datagram sockts: connection-less and message-oriented.

In Pi Calculus (and CSP), there is both channel and message.

• Is it correct that a channel is a connection? Or what is the difference between them?
• How do connection and message coexist and work together?

Thanks.

## calculus and analysis – Simplify kronecker delta in the derivative of a summation

new to Mathematica and tackling an economics maximization problem. When I take the derivative of the utility function s.t. the budget constraint, it shows it with a changed index and kronecker deltas in it.

I understand that the derivative changes depending on whether the indices are equal.
How do I simplify that Kronecker delta in order to have the derivative taken at t=k(1)?

$$L=sum _{t=0}^{infty } beta ^t left{left(frac{text{Cs}(t)^{1-text{sigma}}}{1-text{sigma}}-frac{NN(t)^{text{phi}+1}}{text{phi}+1}right)-text{budget} lambda (t)right};$$

budget = P(t)*Cs(t) + Q(t)*B(t) – B(t – 1) – W(t)*NN(t) – T(t);

Take the derivative with respect to B(t)

D(L(Cs, l, B, P, Q, W, l, T), B(t))

And the result has this shape:

$$left{sum _{K(1)=0}^{infty } -beta ^{K(1)} lambda (K(1)) (Q(K(1)) delta _{t,K(1)}-delta _{t,K(1)-1})right}$$