differential equations – Solve PDE with contraints and unknown boundary conditions

I have a 2D PDE

mu = -0.1;
lambda = -1;
x10 = 0;
x20 = 0;
eq = {mu*x1 + D(h1(x1, x2), x1)*mu*x1 + 
     D(h1(x1, x2), x2)*lambda*(x2 - x1^2) == mu*(x1 + h1(x1, x2)), 
   lambda*(x2 - x1^2) + D(h2(x1, x2), x1)*mu*x1 + 
     D(h2(x1, x2), x2)*lambda*(x2 - x1^2) == 
    lambda*(x2 + h2(x1, x2))};

The definite region is {x1, -2, 2} and {x2, -2, 2}. The problem is that I don’t know the boundary condition of the PDE, but I do have a constraint that the gradient of h1 and h2 at point (x10, x20) is zero.

D(h1(x1, x2), x1)/.{x1 -> x10, x2 -> x20} == 0
D(h1(x1, x2), x2)/.{x1 -> x10, x2 -> x20} == 0
D(h2(x1, x2), x1)/.{x1 -> x10, x2 -> x20} == 0
D(h2(x1, x2), x2)/.{x1 -> x10, x2 -> x20} == 0

How can I approximate h1(x1, x2) and h2(x1, x2) numerically in Mathematica?

solve this equation with solve or reduce?

in this equation i must find or clear rb , but MMA is reluctant to calculate it .
Am I doing something wrong? Logarithms should always be positive

Reduce(qb == (ta - 
   tb)/(ri ((1/(ri*hi)) + log((re/ri)/k) + 
     log((rb/re)/k0) + (1/(re*he)))) && ri != 0 && hi != 0 && 
     re != 0 && he != 0 && k != 0 && k0 != 0 && rb != 0 && 
    rb/(k0 re) > 0 && re/(k ri) > 0, rb) // FullSimplify

note that ri not is r * i

syntax – What is the right way to solve this equation in R, it does not work for me with either solve or reduce? Are there any other commands?

in this equation i must find or clear rb , but MMA is reluctant to calculate it .
Am I doing something wrong? Logarithms should always be positive

Reduce(qb == (ta - 
   tb)/(ri ((1/(ri*hi)) + log((re/ri)/k) + 
     log((rb/re)/k0) + (1/(re*he)))) && ri != 0 && hi != 0 && 
     re != 0 && he != 0 && k != 0 && k0 != 0 && rb != 0 && 
    rb/(k0 re) > 0 && re/(k ri) > 0, rb) // FullSimplify

note that ri not is r * i

java – help me solve it i want to find the occurrence of number in an array and a combination of same element into an arraylist

I am trying to find the combination of same numbers in an array in java e.g i have number in an array e.g numbers{1,2,2,2,1,1,1,2,2,2,1,1,2,2,2,1,1,1,2,2,1} .So i want the program to check all combinations of number that occurred in a sequence of order only like 1, or 2,2,2 or 1,1,1 or 2,2,2 then it will check how many times did 2 or 1 occur so the occurred number will be stored in an arraylist. In that case first 1 occurred 1 time then 2 occured 3 times then 1 occurred 3 times then 2 occurred 3 times and so on it will show how elements are arranged in an array .i have wrote a code but it is not working in java as i want it to

public class Main {

private static ArrayListPlistItem=new ArrayList();

private static ArrayListNlistItem=new ArrayList();

private static ArrayListPwillhappen=new ArrayList();

private static ArrayListNNhappen=new ArrayList();

private static ArrayList LhappenList=new ArrayList();

private static ArrayList NhappenList=new ArrayList();

private static ArrayList LhappenListTotal=new ArrayList();

private static ArrayList NhappenListTotal=new ArrayList();

private static int Lhappen=0;
private static int Lhappen2=0;

private static int Nhappen=0;
private static int Nhappen2=0;
private static int () items ={1,2,2,2,1,1,1,2,2,2,1,1,2,2,2,1,1,1,2,2,1};
private static int () Nhappenitems =new int(1);
private static int () Lhappenitems =new int(1);

public static void main(String ()args){

PlistItem.add(1);
NlistItem.add(2);

//comparing elements from an array which with an arraylist number
for(int y=0; y<items.length; y++){

if(PlistItem.get(0)==items(y)){
//counter to count how many times 1 occurred
Lhappen++;
//counter to count how many times 1 occurred
Lhappen2++;
//adding the counter in arraylist
Pwillhappen.add(0, Lhappen);

//adding the numbers how many times it occured in arraylist
Lhappenitems(0)=Lhappen2;

//adding in total number it occur in an arraylist
LhappenListTotal.add(0,Pwillhappen.get(0));
//setting the counter into 0
Nhappen=0;

}else if(NlistItem.get(0)==items(y)){
//counter to count how many times 2 occurred
Nhappen++;
//counter to count how many times 2 occurred
Nhappen2++;
//adding the counter in arraylist
NNhappen.add(0,Nhappen);
//adding the numbers how it many times it occurred in arraylist
Nhappenitems(0)=Nhappen2;

//adding in total number it occur in an arraylist
NhappenListTotal.add(0, NNhappen.get(0));
//setting the counter into 0
Lhappen=0;

}

}

System.out.println(” RESULTS ” );
System.out.println(“——————————————————————————–“);
System.out.println(“1 occurrence total “+ Nhappenitems(0) +” times”);
System.out.println(“2 occurence total “+ Lhappenitems(0) +” times”);
System.out.println(“——————————————————————————–“);
for(int i=0; i<LhappenListTotal.size(); i++){
System.out.println(” combination of 1’s occurred “+ LhappenListTotal.get(i) +” times”);

}

System.out.println(“——————————————————————————–“);
for(int i=0; i<NhappenListTotal.size(); i++){

System.out.println(“combination of 2’s occurred “+ NhappenListTotal.get(i)+” times”);
}

}
}

RESULTS

1 occurrence total 11 times

2 occurence total 10 times

combination of 1’s occurred 1 times

combination of 1’s occurred 3 times

combination of 1’s occurred 2 times

combination of 1’s occurred 1 times

combination of 1’s occurred 2 times

combination of 1’s occurred 1 times

combination of 1’s occurred 3 times

combination of 1’s occurred 2 times

combination of 1’s occurred 1 times

combination of 1’s occurred 1 times

combination of 2’s occurred 2 times

combination of 2’s occurred 1 times

combination of 2’s occurred 3 times

combination of 2’s occurred 2 times

combination of 2’s occurred 1 times

combination of 2’s occurred 3 times

combination of 2’s occurred 2 times

combination of 2’s occurred 1 times

combination of 2’s occurred 3 times

combination of 2’s occurred 2 times

combination of 2’s occurred 1 times

my code when i run it is showIng as above results instead i want my results to be as below so help me to solve the code to produce the results as below it show produce the result same as the elements how they are arranged in an array.. items ={1,2,2,2,1,1,1,2,2,2,1,1,2,2,2,1,1,1,2,2,1};

RESULT

combination of 1’s occurred 1 times

combination of 1’s occurred 3 times

combination of 1’s occurred 2 times

combination of 1’s occurred 3 times

combination of 1’s occurred 1 times

combination of 2’s occurred 3 times

combination of 2’s occurred 3 times

combination of 2’s occurred 3 times

combination of 2’s occurred 2 times

plugins – 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. 🙂

I know I am baka but please help me this is non exact equation and I am unable to to find which rule to apply to solve it

Thanks for contributing an answer to MathOverflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

php7 – How to solve “Webp format is not supported by PHP installation” on Ubuntu

I’m using laravel 7 on Ubuntu running PHP 7.4 and Apache. Before upgrading PHP version and Ubuntu I had no issued encoding images into webp format but now I always get

Webp format is not supported by PHP installation

I have tried this

sudo apt-get update
sudo apt-get install webp

But that didn’t solve my problem. When I run php -r "var_dump(gd_info());" I get

enter image description here

How can I add webp support without recompiling PHP?

equation solving – Perform Eliminate, Solve and Format at once in Mathematica

I have a series of equations where I use eliminate to get a new equation with desired variables. This equation is then solved for a specific variable and then the result is presented in a specific InputForm. Here is how I am doing it currently.

Eliminate({f == x^2 + y^2, a == x + y, b == x y}, {x, y})
2 b + f == a^2

Solve(2 b + f == a^2, b)
{{b -> 1/2 (a^2 - f)}}

Format(b, InputForm) /. {b -> 1/2 (a^2 - f)}
(a^2 - f)/2

So, I copy the result from Eliminate and then solve it for my variable and then copy the output and format it later.

Is there an easier way to do all this? For example, can I somehow specify in a single step the variables I want to eliminate and the variable for which I want to solve the equation and then get the output in InputForm?

I will probably have to do this for a lot of equations. So, copying each output, again and again, gets very tiresome.

Thanks.

python – How can I solve these formulas from a dictionnary (recursively?)

I have a large dataset (5000 lines) with the following format

value1 = 0.9 *given3 + 0.9 *given1

value2 = 1.0 *given3 + 1.3 *given1 + 0.2 *value1

value3 = 1.8 *value1 + 1.7 *given3 + 0.7 *value2

value4 = 1.4 *value1 + 1.2*given2 + 0.8 *value3 + 0.1*value2

With

given1= 1.4, given2= 1.7, given3= 1.9

I’ve managed to extract all of the values from a file and put them in a dictionnary,

i.e :
dict("value1") = {'value1': '0.9*given3 + 0.9 *given1'}

I’m not sure how to proceed to compute all of the formulas then print out the final values. Any help would be appreciated.

Which graph partitioning algorithm can solve this problem?

Your problem is $text{NP}$-hard. To see why, consider the version of the 3-Partition problem where we’re given multiset $ X = { x_1, x_2, ldots, x_{3n}}$ of $3n$ nonnegative integers, and we need to decide whether $X$ can be partitioned into three disjoint multisets with the same sum each. Clearly, an instance $X = { x_1, x_2, ldots, x_{3n}}$ of the 3-Partition problem can be translated in polynomial time into a complete graph $G = langle V, E rangle$, where $V = { v_i}_{iin (3n)}$ and for each $v_i$, we have that the weight $w(v_i) = x_i$. That is, we view the integers as $3n$ vertices, and every two vertices are connected with an edge. Obviously, a balanced 3-clustering of $G$ corresponds to an appropriate 3-partition of the multiset $X$.