Getting Mathematica to solve a system of two second order nonlinear ordinary differential equations

I tried solving a system of two second order nonlinear ordinary differential equations using the DSolve command. First, I tried like this:

eqns = {A''[x] == 2/B[x]*A'[x]*B'[x],     B''[x] + 1/B[x]*(A'[x])^2 - 1/B[x]*(B'[x])^2 == 0}; sol = DSolve[eqns, {A, B}, x] 

However, as Mathematica didn’t (couldn’t?) solve this, I transformed it into a system of four first order equations:

eqns = {c'[x] == 2/B[x]*c[x]*d[x],     d'[x] + 1/B[x]*(c[x])^2 - 1/B[x]*(d[x])^2 == 0, c[x] == A'[x],     d[x] == B'[x], c[0] == 1, d[0] == 1, A[0] == 1, B[0] == 1}; sol = DSolve[eqns, {A, B, c, d}, x] 

This still doesn’t work. Weirdly enough, I don’t even get an error message.

I only included the boundary conditions thinking that they may be helpful, but they aren’t part of my original problem.

Your help would be greatly appreciated:)

Who Was The Second Vampire Ever In Pathfinder?

When looking at Vampires on the Pathfinder wiki, it says that Zura, the Demon Lord of Cannibalism and Vampires, was the first Vampire to have ever existed, which seems natural enough. Also on the page, it makes mention of Ruithvein, the Blood Emperor, who is an Infernal Duke on the sixth layer of Hell.

The page says "The third Vampire to come into being, he descended into the ranks of Hell’s nobility" however it makes no mention of who the second Vampire was. I considered the idea of it being Lorcan, as the two compete for the souls of Vampires who have gone to the Nine Hells, however I find it unlikely Lorcan is a Vampire at all, due to there being no mention of it, let alone him being the second Vampire to have ever existed. His areas of concern being blood, undeath, and rebirth however do fit well with the themes of Vampirism, but due to the wiki making no mention of him being a Vampire, I don’t think Lorcan is the second Vampire.

We have Zura, the first Vampire ever, who became a Vampire by pulling an Elizabeth Bathory; drinking and bathing in the blood of her subjects to retain her youth and beauty, who became a Demon Lord, and we have Ruithvein, the third Vampire ever, who became a powerful Infernal Duke. It seems to me that Ruithvein became a Vampire after being turned by the second ever Vampire, and if the first Vampire is a Demon Lord, and the second Vampire is an Infernal Duke, I find it hard to imagine the second Vampire ever, who would have been made into a Vampire by Zura herself most likely, is just some no name who didn’t accomplish much, save for turning Ruithvein into a Vampire.

If Zura was the first Vampire, and Ruithvein was the third Vampire, who was the second Vampire? Do we know, or at least have some clues to suggest their identity?

First object jumps on re-entry of second colliding object

The scenario is that I have two objects – Object A and Object B. The Object A is lying on the ground and when Object B enters the collider of Object A, the Object A moves (only X and Z axis) with Object B. The movement works well with the script shown below.

The issue is that most of the time, the Object A’s initially position shifts by few meters whenever Object B enters its collider. I feel it is related to offset position. What should happen is that, Object A should be the same position when Object B enters the collider and move along with Object B only when Object B moves.

So how do I fix this?

private Vector3 offsetPosition;  public Transform ObjectB;  public bool ObjectB_Collision = false;  void Start () {         offsetPosition = ObjectB.transform.position - this.transform.position;     }      void ObjectB_HasEntered() {         offsetPosition = ObjectB.transform.position - this.transform.position;     }       // Update is called once per frame     void LateUpdate () {          if (ObjectB_Collision == true) {             this.transform.position = new Vector3 (ObjectB.transform.position.x, this.transform.position.y, ObjectB.transform.position.z) - new Vector3 (offsetPosition.x, 0, offsetPosition.z);         }      }  public void OnTriggerEnter (Collider col) {         if (!enabled) return;          if (col.gameObject.name == "Object_B") {             ObjectB_HasEntered();             ObjectB_Collision = true;         }     }   public void OnTriggerExit (Collider col) {         if (!enabled) return;         if (col.gameObject.name == "Object_B") {             ObjectB_Collision = false;          }     } ``` 

Is this homebrew shortbow unique item balanced? (second version)

Thanks everyone for the insightful advice you offered for the first iteration of this unique artifact for one of my players. If you’d like to read the background and initial considerations on this item, please refer to the previous question: Is this homebrew shortbow unique item balanced?

Changes and considerations

  • Reduced the amount of active abilities in favor of passive ones;
  • Reduced the flat +1/+2/+3 bonus to hit and damage for a lower +0/+1/+2;
  • Reworded and clarified the teleport ability, and made it a bit more "dangerous" to use;
  • Clarified the Freedom of Movement aura ability, and made it shorter-ranged as well so that there’s more risk in jumping in the fray to help out a restrained ally;
  • Changed damage type from force to radiant to stay closer to the theme;
  • The line attack changed from a creature within 120 feet to a point within 80 feet, both to match the range of the weapon and to make it both more versatile to use. Not sure if it’s really relevant or recommended;
  • spread the damage increase across the levels and capped it to 1d10;
  • Fly became passive and permanent instead of limited to 1h;
  • Added a passive ability that would protect the user from conditions that could reduce their agency against manipulative monsters.

Item levels reference points

  • The item is going to be awarded somewhere around character level 6, and it’ll start from Dormant
  • The item is going to be Awakened around level 10 or 11, depending on the roleplay of the user
  • The item is going to be Exalted around level 15, with the same caveat as before.

Eleutheria, The Chainbreaker

Simple weapon, ranged weapon, artifact (requires attunement) 1d6 radiant (80/320 ft.), two-handed

The shortbow is made of an extremely light wood with colors that vary between walnut and cherry. When exposed to dawn or dusk light, it shines with golden reflections. The grip is wrapped in soft, white leather that seems impervious to dust and grime. All along the upper and lower limbs of the bow, there’s a number of empty, unusually shaped grooves and slots.

Sentience: Eleutheria is a sentient Chaotic Good weapon with an Intelligence of 15, a Wisdom of 19 and a Charisma of 16. It has hearing and blindsight out to a range of 80 feet. The weapon communicates telepathically with its wielder and can speak, read, and understand Celestial and Sylvan.

Personality: A Curious, incautious and excitable Fey spirit lives within Eleutheria. It has an insatiable appetite for adventure, bold actions, and a very personal sense of justice and hatred for tyrants and bullies. The spirit wishes to learn more about the world and its inhabitants.

Dormant: The shortbow grants the following benefits in its dormant state:

  • You can speak, read, and write Celestial and Sylvan.
  • The attacks of this weapon are considered magical.
  • The shortbow doesn’t need physical arrows when attacking. Translucent arrows of pure energy magically appear as soon as you draw the bow’s string.
  • When you make an attack against an hostile creature using Eleutheria, you can use a bonus action to magically teleport to a space you can see within 15 feet of the target of that attack. You can’t use this property again until you take a short or long rest.
  • While Eleutheria is on your person, you have Advantage on Intelligence (Investigation) checks made for detecting traps and Dexterity checks for attempting to pick locks on cages, manacles, or other restraints in order to free a trapped creature. If you aren’t proficient with Thieves’ Tools, you become proficient when picking locks on cages, manacles, or other restraints.

Awakened: When the shortbow reaches an awakened state, it gains the following properties:

  • You gain a +1 bonus to attack and damage rolls made with this magic weapon.
  • Your walking speed increases by 10 feet.
  • The base damage die of this weapon becomes 1d8.
  • While holding the shortbow, you can use a bonus action to evoke a gentle, warm (or cool, your choice) breeze to flow around you for the duration. For 1 hour, you and any creature of your choice will benefit from the effects of Freedom of Movement while they’re within 5 feet of you. You can’t use this property again until the next dawn.
  • When you speak its command word, your arrow transforms into a beam of pure radiant energy, forming a line 5 feet wide that extends out from you to a point you can see within 80 feet of you. Each creature in the line, excluding you, must make a DC 16 Dexterity saving throw, taking 5d12 radiant damage on a failed save, or half as much damage on a successful one. This property can’t be used again until the next dawn.

Exalted: When the shortbow reaches an exalted state, it gains the following properties:

  • The weapon’s bonus to attack and damage rolls increases to +2.
  • Your walking speed increases by an additional 10 feet.
  • The base damage die of this weapon becomes 1d10.
  • You can channel the winds around you to support you in your movement. You gain a flying speed equal to your walking speed.
  • While attuned to the shortbow, you can’t be charmed, frightened, petrified, or forced to be prone.

Query to find the second highest row in a subquery

The goal is to send notifications about the customer updates but only for the first one if there are consecutive updates from the customer in a ticketing system.

This is the simplified query that I’m using to get the data that I need. There are a few more columns in the original query and this subquery for threads is kind of required so I can also identify if this is a new ticket or if existing one was updated (in case of update, the role for the latest threads will be a customer):

SELECT t.ref, m.role    FROM tickets t    LEFT JOIN threads th ON (t.id = th.ticket_id)    LEFT JOIN members m ON (th.member_id = m.id)   WHERE th.id IN ( SELECT MAX(id)                      FROM threads                     WHERE ticket_id = t.id                 ) 

It will return a list of tickets so the app can send notifications based on that:

+------------+----------+ | ref        | role     | +------------+----------+ | 210117-001 | customer | | 210117-002 | staff    | +------------+----------+ 

Now, I want to send only a single notification if there a multiply consecutive updates from the customer.

Question:

How I can pull last and also one before last row to identify if this is consecutive reply from the customer?

I was thinking about GROUP_CONCAT and then parse the output in the app but tickets can have many threads so that’s not optimal and there are also a few more fields in the query so it will violate the ONLY_FULL_GROUP_BY SQL mode.

db<>fiddle here

non linear second order pde

I try to solve the following problem with zero luck. Any suggestions?

d = 5*10^27; t0 = 0; t1 = 10^7; t2 = 2*10^7; Q = 1;` 

pde = -dD[n[r, t], {r, 2}] – (2d)/rD[n[r, t], r] + D[n[r, t], t] – QDiracDelta[t – t0] – Q*DiracDelta[t – t1]==0`

ic = {n[r, 0] == 1/r, n[0, t] == t^-1.5}

sol[r_, t_] == DSolveValue[{pde, ic}, n[r, t], {r, t}]

Full line trajectories plot for the solution of Second Order nonlinear coupled differential equations

I wanted to plot a phase plane containing the trajectories of the solutions found by using ‘NDSolve’ using the initial conditions for x[0], y[0], x'[0] and y'[0]. The equations are: x”[t] – 2 y'[t] == -x[t] + y[t]^2; y”[t] + 2 x'[t] == x[t] + y[t] + x[t]*y[t]

The equilibrium point for the system is (0,0). I have plotted the stream plot for the system but unable to plot a phase portrait that would give me the full line trajectories of the system for different initial conditions. I am also looking for any periodic solution if present in it. The stream plot I got is given below and I would take initial conditions from it.

enter image description here

I get this by using the Parametric Plot of the NDSolve solution:

enter image description here

Kindly help in this capacity. Thanks in advance.

Does the Psi Warrior’s Psionic Strike ability prompt a second Concentration save?

The new Psi Warrior Fighter subclass has the feature Psionic Power which has the following option:

Psionic Strike. You can propel your weapons with psionic force. Once on each of your turns, immediately after you hit a target within 30 feet of you with an attack and deal damage to it with a weapon, you can expend one Psionic Energy die, rolling it and dealing force damage to the target equal to the number rolled plus your Intelligence modifier.

Based on my earlier question it seems the consensus is that Psionic Strike does not double if the triggering attack is a critical hit.

If Psionic Strike is used on a creature concentrating on a spell does the additional damage prompt a second Constitution save to maintain concentration?

WHY is Soulknife’s second attack NOT Two-Weapon Fighting?

Ask about Soulknife rogue, D&D 5E

Hello, I know there is a question "Do you add your ability modifier to damage for the Soulknife’s second attack?" with reply being "Yes you do because it is not two weapons fighting". This is not IF, but WHY.

Recently I encountered this problem while playing Soulknife and pretty much my entire group was like "it’s in off-hand, it’s two weapons fighting because you are literlly using two blades, it should not apply".

Why wouldn’t Soulknife’s second blade be considered Two-Weapon Fighting while using bonus action to use second blade?

Is it because both are not held at the same time or something like it? Some wordplay on second and two not being the same word? I honestly do not understand why two weapons are not two weapons fighting. I am not english native so maybe there is something crucial and obvious escaping me.

Also, am I correct to assume that if second blade is not considered two weapons fighting, then it goes like this:

First blade: Attack roll 1d20 + prof + mod; Damage roll 1d6 + mod

Second blade: Attack roll 1d20 + prof + mod; Damage roll 1d4 + mod

Do you add your ability mod to damage for the Soulknife’s second attack?

In D&D 5E, normal Two-Weapon Fighting lets you use your bonus action when you’ve used your action to Attack. It says:

You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative.

The new Tasha’s Cauldron subclass Soulknife has a feature where you can create a blade of energy and attack with it, and that says:

After you attack with the blade, you can make a melee or ranged weapon attack with a second psychic blade as a bonus action on the same turn, provided your other hand is free to create it. The damage die of this bonus attack is 1d4, instead of 1d6.

It looks to me that while this is similar to Two-Weapon Fighting, it is not that same, and the normal bonus to damage would apply. Am I right?