How to solve the features problem

I am building an Influencer marketing platform in WordPress. It connects advertisers with influencers to promote their products (advertisers products) on their Instagram (social media) (Influencers), in return, Influencers get paid.

Influencers sign up, connect their social media so their following is seen on their profile, set up their profile, and find campaigns from advertisers and submit to the advertiser’s campaigns.

Advertisers sign up, submit their campaign: for example, they put in that they will give around $ 15 if an influencer promotes their products/services through their social media (they also have the option to select which social media they want the influencers to promote on, and how many followers the influencer must minimum have to submit to this campaign.). The advertisers have to add photos or videos of their products/services for the campaign.

After the advertiser’s campaign is approved by us: The Influencers now have the option to submit offers: offer to receive money from the advertisers from their campaign to promote on their social media Influencers can choose to offer to receive money from the campaign starting from 3$ to X$ . There will be a 19% fee from us, both and separate for the advertiser and the influencer. The advertiser sees from his account which influencers submitted to their campaign and can choose to accept or decline the offers.

If the advertiser accepts the influencer’s offer to promote on their social media, the advertiser has to send the requirements to the influencer (via our platform). After that, the influencer has to accept the requirements and post on their social media. After that is done, the influencer gets paid (let there be a balance for the influencer on my website). The money is added to their balance and they can withdraw the money to their (for example) Paypal account whenever they want, with a minimum withdrawal of the amount of 5$ .

This requires 2 different accounts: 1 for the influencer and 1 for the advertiser, both having different features.

I want these features on my WordPress website, but I don’t know for example how to set up these accounts. And also for example to show the availability of creating a campaign for advertisers. And for example adding social media to the Influencer’s account page that shows how many followers the influencer has.

Any help would be appreciated. 🙂

WolframClient Converting Output Of Solve To Sympy

I’m trying to convert the output of WolframClient to Python. Here’s a toy example:

from wolframclient.evaluation import WolframLanguageSession from wolframclient.language import wl, wlexpr  def get_session():     session = WolframLanguageSession()     session.evaluate(wlexpr('Range[5]')) #warmup     return session  session = get_session() print(session.evaluate("Solve[a[0]==5/3,a[0]]]")) 

Giving

((Rule[Global`a[0], Rational[5, 3]],),) 

I’m hoping to instead get something simpler (a string is sufficient):

"a[0] = 5/3" 

Motivation:

Ideally I’d like to port the output of mathematica to Sympy. I’ve tried Sympy’s Mathematica parser, but it doesn’t recognize any of the "non-whitelisted" expressions such as Rational[5,3]. I’ve tried using Mathematica’s InputForm function but that doesn’t seem to work.

Assign function to a variable and solve it symbolically

I have a function such as y = sin(x) + c. I’d like to solve it symbolically for c (but first assign the function to a variable, so I don’t have to enter it multiple times in case I want to solve it for x as well. Any suggestions how I can do this?

I’ve tried this:

fn[x_, c_] := Sin[x] + c Solve[fn, c] 

but getting an error ‘fn is not a quantified system of equations’.

Any help is appreciated.

Behavior of Solve with $Assumptions changed in 12.2

Something changed with Solve between versions 12.1 and 12.2.

12.1:

Solve[n == n E^(r (1 - n)), n] (* Solve::ifun -- Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. *) (* {{n -> 0}, {n -> 1}} *)  $  Assumptions = {n >= 0}; Solve[n == n E^(r (1 - n)), n] (* Solve::ifun -- Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. *) (* {{n -> 0}, {n -> 1}} *) 

12.2:

Solve[n == n E^(r (1 - n)), n] (* Solve::ifun -- Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. *) (* {{n -> 0}, {n -> 1}} *)  $  Assumptions = {n >= 0}; Solve[n == n E^(r (1 - n)), n] 

enter image description here

Is this an improvement or a bug? It seems hard for the condition ConditionalExpression[1, Re[r] == 0 || Re[r] > 0 || Re[r] < 0] not to hold, but maybe I’m overlooking something.

Two work-arounds:

$  Assumptions = {n >= 0, r \[Element] Reals}; Solve[n == n E^(r (1 - n)), n]  Solve[n == n E^(r (1 - n)), n, Reals] 

both give {{n -> 0}, {n -> 1}} (no Solve::ifun either).

Another example, not fixable by including Reals:

$  Assumptions = {n1 >= 0, n2 >= 0}; Solve[0 == n1 (1 - n1 - 0.5 n2), n1] 

enter image description here

I want to use the output of Solve and/or Reduce in next steps. But the output comes in the form of a rule [duplicate]

In a program I want to use the output of Solve and/or Reduce in next steps. But the output comes in the form of a rule, where what I want is the numerical solution. Here is an example. Say I write s=Solve[x+2==5,x]. In the next step I want to use this solution, so I write: y=2 s +3. This returns {{3+2(x->3)}}. This is a very basic need, but hours combing through the documentation leads nowhere.

Using output from Solve or Reduce as a value in subsequent equation

I’m trying to run a simulation. I will number sentences to make response easier. (1) Here is my first equation:

𝑗[LBar_, y_, x1_, σ_, X2M_, w_, X1M_]:=(LBar(𝜎−1)⁄𝜎 + 𝑦(𝜎−1)⁄𝜎−x1(𝜎−1)⁄𝜎)𝜎⁄(𝜎−1)−(𝑦−X2M+𝑤(LBar+X1M)−𝑤x1) 

(2) I insert some parameter values and Reduce:

Reduce[𝜕x1(𝑗[100,𝑦,x1,13⁄,42,.23,80])==0 && x1>0, x1, Reals] 

(3) This produces output:

x1 == 119.575 

(4) When I try to call the output value (119.575) I run into problems. (5) For instance

2 % 

results in:

2 (x1 == 119.575) 

(6) and

j[100, 80, %[[2]], 1/3, 42, .23, 80] 

produces this output:

-79.4 + 1/Sqrt[41/160000 - 1/239.149[[2]]^2] + 0.23 239.149[[2]] 

Why both DSolve and NDSolve are unable to solve a second-order differential equation?

I am trying to solve a recurrence relation using generating functions method. After some long calculations, I have arrived to this second-order differential equation: $ 0.5 x^5 y”(x)+(2x^4+x^3)y'(x)+\left(x^3+x^2+x-1\right)y(x)+1=0$

and these conditions: $ y(0)=1, y'(0)=1$ . $ y(x)$ is the function that needs to be expanded as Taylor Series at $ x=0$ to obtain the sequence from the coefficients. However, when I try to solve it both using DSolve and NDSolve, I have no luck. With DSolve it just returns the request itself:

$ $ \text{DSolve}\left[\left\{0.5 x^5 y”(x)+(2. x+1) x^3 y'(x)+\left(1. x^3+x^2+x-1\right)y(x)+1=0,y(0)=1,y'(0)=1\right\},y,x\right]$ $

And with NDSolve I just receive errors and no equation:

Power::infy: Infinite expression 1/0.^5 encountered. Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. NDSolve::ndnum: Encountered non-numerical value for a derivative at x == 0.`. 

$ \text{NDSolve}\left[\left\{0.5 x^5 y”(x)+(2. x+1) x^3 y'(x)+\left(1. x^3+x^2+x-1\right)y(x)+1=0,y(0)=1,y'(0)=1\right\},y,\{x,0,1\}\right]$

How could I resolve this problem?

How to solve this 2nd-order linear ODE analytically?

I want to analytically solve the eigenvalue problem $ $ y”(x) – 2\gamma\, y'(x) + [\lambda^2 + \gamma^2 – (\frac{x^2}{2}+\alpha)^2 + x]\, y(x)=0$ $ where $ \lambda$ is the eigenvalue and $ \alpha,\gamma$ are parameters. The boundary condition is $ y(\pm\infty)=0$ .

Or instead of the eigenvalue problem, it will as well be nice to just solve it with freely running $ \lambda$ . Then probably I can tackle the eigenproblem by imposing the boundary condition.

The following code doesn’t work well. Is there any possible way beyond?

F := (D[#, {x, 2}] -       2 \[Gamma] D[#, x] + (\[Lambda]^2 + \[Gamma]^2 + (x^2/2 + \[Alpha])^2 + x) #) &; DEigensystem[{F[y[x]] /. \[Lambda] -> 0,    DirichletCondition[y[x] == 0, True]},   y[x], {x, -\[Infinity], \[Infinity]}, 5] DSolve[F[y[x]] == 0, y[x], x] 

Using Solve[] to find Eigenstates of a 1D Double Dirac Potential

I’d like to Solve

$ $ k^2 \equiv – \frac{2mE}{\hbar^2} = (- \frac{mA}{\hbar^2} (1+ e^{-2ka}))^2 $ $

for E, in terms of m, $ \hbar$ , A, a.

I tried using the following command:

Solve[-((2 m ene)/h^2) == (m^2 A^2)/h^4 (1 + E^(-2 a*Sqrt[-((2 m ene)/h^2)])), ene] 

Isn’t working well for this task. What do you recommend? At first glance it seems it could not be simple to solve "by hand".

Background: This problem comes from Solving a 1D Quantum well with 2 Symmetric Dirac’ Deltas $ \delta_a$ and $ \delta_{-a}$ , where $ A$ is the amplitude.