Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.5K Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Include x in the DE returned by the EulerEquations?

Posted 7 years ago
POSTED BY: Daniel Voloshin
4 Replies

Delete **First@** you will see the differences. @ is Map function and First is equivalent to Flatten

Execute:

 ?First

or

 ??First
POSTED BY: Mariusz Iwaniuk

Syntax !!!

   Needs["VariationalMethods`"];
   sol = EulerEquations[12*x*y[x] + y'[x]^2, y[x], x]
   (* 12 x - 2 (y^??)[x] == 0 *)

   First@DSolve[sol, y[x], x]
   (* {y[x] -> x^3 + C[1] + x C[2]} *)

   First@DSolve[{sol, y[1] == 0, y[3] == 26}, y[x], x]
   (*  {y[x] -> -1 + x^3} *)
POSTED BY: Mariusz Iwaniuk

Thanks! I gained a lot of knowledge:)

POSTED BY: Daniel Voloshin

Oh my god, thank you so much! That solved my problem. But what does "First@" do? I couldn't find it in the documentation...

POSTED BY: Daniel Voloshin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard