integration – Evaluate the triple integral $iiintlimits_Efrac{yzdxdydz}{x^2+y^2+z^2}$ using spherical coordinates

How to evaluate triple integral $$iiintlimits_Efrac{yzdxdydz}{x^2+y^2+z^2}$$
when $E$ is bounded by $x^2+y^2+z^2-x=0$?

I know that spherical coordinates mean that $$x=rsinthetacosvarphi,quad y=rsinthetasinvarphi,quad z=rcostheta$$
and this function in spherical coordinates is
&iiintlimits_Efrac{yzdxdydz}{x^2+y^2+z^2} = iiintlimits_Efrac{r^2sintheta}{r^2sin^2thetacos^2varphi + r^2sin^2thetasin^2varphi + r^2cos^2theta}drdtheta dvarphi = \ &iiintlimits_Efrac{r^2sintheta}{r^2(sin^2thetacos^2varphi + sin^2thetasin^2varphi + cos^2theta)}drdtheta dvarphi = iiintlimits_Efrac{sintheta}{sin^2thetacos^2varphi + sin^2thetasin^2varphi + cos^2theta}drdtheta dvarphi

but I don’t know how to write $E$ as set and convert it to spherical coordinates, and also what happens with this function after conversion. Triple integrals is now topic for me and I have never used spherical coordinates before, so I would be grateful if anyone can help me with this.

data – Sorting a list of coordinates by their value – within the coordinate

Given is a simplified list of coordinates.


What I want to do is sort the numbers withing the coordinates after their value (from max to min) like this.


So far I only found questions that were concerned with ordering the coordinates but none of them were concerend with sorting insides of the coordinates.

Thank you very much for your help.

equation solving – Draw in detail a polygon and coordinates as a result of a system of inequalities,(linear programming) ¿ how to implement?

This is the set of inequalites that generates a linear programming problem whose
objective function is

$f(x,y)=9x +12y$,


$2rightarrow{}2x +y leq{520}$,

$3rightarrow{}2x+5y leq{}1200$,

$4rightarrow{}x leq{}0$,

$5rightarrow{}y leq{}0$,

I need to maximize the objective function, but the graphics are unclear when it comes to the points,
a) then the problem to be solved by MMA would be to show me a graph with enough detail with the coordinates of the solution polygon, drawn it by hand, with geogebra, symbolab and it is not possible to appreciate it well (note: I do not know the symplex method. And this is not a task, is personal knowledge)
b) I have never solved a linear programming problem using MMA and I would like to know how it can be done using the mathematical syntax.

If you can help me, I would appreciate it very much

calculus – Double integrals in polar coordinates with unexpected result

I have been working on an exercice where I need to convert to polar coordinates :

enter image description here

To me, it makes perfect sense that $ (x + y).dx.dy $ became : $(r.cos(theta) + r.sin(theta)).r.dr.dtheta$

What I don’t understand is that, I was expecting to work between $r = -1$ and $r = -2$ ;

$theta = – pi/2$ and $theta = pi/2$

Instead, the solution puts $r = 1$ and $r = 2$ ;
$theta = pi/2$ and $theta = 3pi/2$

Could you tell me why ? (I am trying to grasp this new concept)

3d – Generating a mesh from a set of generatively produced co-ordinates

Using Unity I’ve been producing sculptural forms that look like this. It’s made of patterns of cubes that twist around each other using a flocking algorithm. I’m trying to get it into a 3D printable format.
enter image description here

From unity I export a PLY that is a list of the co-ords of each cube that looks like:

format ascii 1.0
element vertex 17500
property float x
property float y
property float z
35 2.521441 0
34.72401 -2.06799 4.386663
33.90041 3.202552 8.704146

Then I’ve imported that into meshlab and run Filters > Remeshing, Simplification and Reconstruction > Surface Reconstruction: Ball Pivoting with the default parameters.

enter image description here

This is the result (different iteration so doesn’t match top image but similar) which is ok, but obviously not 3d printable.

Is there a better way of doing this in Unity to create a single mesh? I’d be happy with either a single mesh with individual lines or a mesh that makes a single shape as if it were shrink wrapped.

java – SQL structure to save coordinates for spigot plugin

I’m writing a spigot plugin where I give the user the possibility to send a message to the admins of the server. One of the requirements is that the coordinates of the player are stored, when the message is sent, and that it is stored in a sql table, so that admins on multiple spigot servers can access them independently of where the message was sent originally.

I have got a simple sql table, which stores the message, the player’s uuid, etc in a table, but I really dislike the idea that I have to store all three values of the Vec3 in separate columns. I googled for a possibility to simply store a Vec3 via SQL, but had no luck.

Here’s an overview of my current table:

enter image description here

I just have this one table with the data in it, which I create like this:

public static void initialiseDatabaseTables() {
        try {
            PreparedStatement ps = DatabaseConnector.getConnection().prepareStatement(
                    "CREATE TABLE IF NOT EXISTS Meldung ("
                    + "id INT AUTO_INCREMENT NOT NULL, "
                    + "UUID VARCHAR(64), "
                    + "NAME VARCHAR(64), "
                    + "MESSAGE TEXT, "
                    + "XCOORD INT, "
                    + "YCOORD INT, "
                    + "ZCOORD INT, "
                    + "ISREAD TINYINT(1), "
                    + "primary key(id))");

        } catch (SQLException e) {

I’d like to know how I can improve in this matter, or the general way how my data is stored. I’m particularly interested in alternative methods to store these coordinates, I don’t know why, I find my current way very unsatisfying.

shaders – How to convert from frag position to UV coordinates when my viewport doesn’t cover the screen?

So, I’m implementing SSAO as part of my rendering pipeline using OpenGL/GLSL. It works pretty well when I have a camera that takes up the entire screen. However, when my camera is smaller than the full screen size, the SSAO texture doesn’t get sampled correctly. Here is the relevant GLSL shader code:

// Convert from clip-space
vec2 fragCoords = (fragPos.xy/ fragPos.w); // fragPos is MVP * worldPosition
vec2 screenCoords = fragCoords * 0.5 + 0.5; // Convert from (-1, 1) to (0, 1) to sample UV coordinates

// Sample texture
float ssaoFactor = texture2D(ssaoTexture, screenCoords).r;

I know that there is some funkiness going on with the viewport, but the fixes that I’ve tried haven’t worked. My first thought was to scale fragCoords by normalized size of my viewport (e.g. vec2(0.5, 0.5) for a viewport with half of the width and height of the screen), but that just produced a very strange result. Any thoughts?

plotting – How to store outputs as coordinates and use ListPlot to plot them?

so I have a program that outputs a desired value for incrementing values of alpha. Right now, my program prints a list of these for 40 values of alpha in the form {alpha, newValue}.

d = 1000;
For(k = 1, k <= 40, k++,
  alpha = 0.1*k;
  fd = 3*d^2/(Pi^2);
   fs = fd*FareySequence(d);
  count = 0; 
  For(i = 1, i < fd, i++, 
   For(j = (i - 1), j > 0, j--, 
     If((fs((i)) - fs((j))) < alpha, count++, Break())););
    newValue = count/d^2;
  Print("{", alpha, ",", newValue, "}");

Here are the first few outputs:


I want to make a plot all of these outputs as coordinates. I want to plot these point on a graph with alpha on the x axis and newValue on the y axis. Any help would be appreciated.