Scalar potential function from 3D vectorial field

I am new at this forum and a beginner with Mathematica. Today I was studying multivariable calculus and I came with this problem. For example, in 2D case I have this code:

DSolve[{D[f[x, y], x] == y*E^(x*y), D[f[x, y], y] == x*E^(x*y)}, f[x, y], {x, y}] 

where $ \vec{F}=(ye^{xy},xe^{xy})$ and if the vector field were not conservative, DSolve would return unevaluated. But, if my vector field consists of 3 variables, how can I modify my previous code?

For instance, with this vectorial field $ \vec{F}(x,y,z) = (y^2z + 2xz^2, 2xyz, xy^2 + 2x^2z)$ , I tried:

DSolve[{D[f[x, y, z], x] == y^2 x + 2 x z^2, D[f[x, y, z], y] == 2 x y z, D[f[x, y, z], z] == x y^2 + 2 x^2 z}, f[x, y, z], {x, y, z}] 

but it doesn’t work. Thanks for your help.

WordPress Admin Post Search extend to one custom field

I would like to extend the WordPress admin post search (so in back-end) in order to look at keywords in post title but also in one custom field.

I find this thread interesseting (except the custom post type because I don’t use it) : Extending the search context in the admin list post screen and adapt my function like below :

function rel_search_join( $  join ) {     global $  pagenow, $  wpdb;     if ( is_admin() && $  pagenow == 'edit.php' && $  _GET['post_type'] == 'post' && $  _GET['s'] != '') {             $  join .= 'LEFT JOIN ' . $  wpdb->postmeta . ' ON '. $  wpdb->posts . '.ID = ' . $  wpdb->postmeta . '.post_id ';     }     return $  join; } add_filter('posts_join', 'rel_search_join' );  function rel_search_where( $  where ) {     global $  pagenow, $  wpdb;     if ( is_admin() && $  pagenow == 'edit.php' && $  _GET['post_type']=='post' && $  _GET['s'] != '' ) {         $  where = preg_replace( "/\(\s*".$  wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/", "(".$  wpdb->posts.".post_title LIKE $  1) OR (".$  wpdb->postmeta.".my-custom-field-meta-key LIKE $  1)", $  where );         $  where = str_replace( "OR wp_posts.post_status = 'pending'", "", $  where );         $  where = str_replace( "OR wp_posts.post_status = 'private'", "", $  where );         $  where = str_replace( "OR wp_posts.post_status = 'draft'", "", $  where );         $  where = str_replace( "OR wp_posts.post_status = 'future'", "", $  where );     }     return $  where; } add_filter( 'posts_where', 'rel_search_where' ); 

But this does not work at all, the search was no longer working at all.

I feel like there is a way easier solution but I am not able to find it on any forums.

I know there are other solutions like custom field filters but it is not suitable for my custom field which can have thousands of values.

PS : I use Advanced Custom Field but I don’t think there is any connection.

How would you plough a field with animation magic?

In Eberron: Rising From The Last War, the nation of Aundair is described as a place where arcane magic is commonly used to perform everyday tasks, almost Harry-Potter-esque in some ways. In the Gazetteer, on page 103, it says:

Magic permeates many aspects of Aundairian life — more so than other nations. A cleansing stone graces every village, and you might encounter animated farming equipment in the fields.

This made me curious whether there’s anything in the rules that would allow for this sort of animation. An animate objects spell could animate a plough or other equipment, certainly, but at 5th level and with only 1 minute of duration, it seems a poor choice for actually getting daily work done. A tiny servant spell has the duration, but doesn’t seem like it could affect something as large as a plough or scythe. The only other spell I can think of is unseen servant, and I’m not sure the servant could even do a task like ploughing a field.

Now of course this could be handled by DM fiat without reference to any specific spell; we could posit that there’s a specific unseen farmhand ritual, that the automatic plough itself is a magic item, or simply handwave away any questions with "it’s just some special magic they have here, don’t worry about it", but I’m curious if there’s an option I’ve missed or if I’ve unfairly dismissed one of the spells I know of.

Is Wall of Stone suppressed by Antimagic Field?

I noticed that the Wall of Stone spell includes this interesting tidbit in its first sentence (emphasized in bold):

A nonmagical wall of solid stone springs into existence at a point you choose within range.

The remainder of the spell mainly deals with how the wall can be shaped, and what happens to trapped creatures. The other relevant bit is the last paragraph:

If you maintain your concentration on this spell for its whole duration, the wall becomes permanent and can’t be dispelled. Otherwise, the wall disappears when the spell ends.

So, the wall of stone is nonmagical, but the spell can be dispelled, which causes the wall to disappear. So, is the wall magic or not? What happens if another wizard casts Antimagic Field around the wall? Will it suppress the spell within the region? And if so, what does that mean for the "nonmagical" wall created and maintained by the non-nonmagical spell?

And even though I’m pretty sure I know the answer for this one, I’ll ask it for the sake of completeness: what effect does Antimagic Field have on a wall of stone that has already been made permanent by concentrating on it for the full duration of the spell?

calculate the flux of a vector field through a surface

How to calculate the flux of a vector field through a surface in mathematica? I’ve this field:

F = (x, x^2 * y, y^2 * z)  

and this surface:

S = { (x,y,z) ∈ R^3 | 2 * Sqrt[x^2+y^2] <= z <= 1 + x^2 + y^2} 

So, I’m trying:

region = ImplicitRegion[2 * Sqrt[x^2+y^2] <= z <= 1 + x^2 + y^2, {x, y, z}];  Integrate[#, {x,y,z} ∈ region]& /@ ({x, x^2 * y, y^2 * z} . {x, y, z}) 

I expect Pi/30 as a result, but it comes out "Infinity"…

What happens to a bag of holding in an Antimagic Field?

During a difficult fight, the wizard of the party decided to launch an antimagic field. It proved to be quite useful and let the warriors almost take out the opposing wizard. Nevertheless, multiple questions arose during the fight concerning what was happening in the field. One of them is about the heroes that have a bag of holding.

What would happen to these? Should they burst because of what’s inside? Should they return to normal, and the stuff in them be lost into oblivion? Nothing? Do you see any other problems that would happen with magical objects going into the field? (I’m afraid to miss something.)