[WSG21] Daily Study Group: Differential Equations (begins November 29)

A new study group devoted to Differential Equations begins next Monday! A list of daily topics can be found on our Daily Study Groups page. This group will be led by one of our outstanding Wolfram certified instructors, Luke Titus, and will meet daily, Monday to Friday, over the next three weeks. Luke will share the excellent lesson videos created by him for the upcoming Wolfram U course “Introduction to Differential Equations”. Study group sessions include time for exercises, discussion and Q&A. This study group will help you achieve the “Course Completion” certificate for the “Introduction to Differential Equations” course after you complete the course quizzes.

Sign up: Study group registration page

13 Likes

In the email giving a link to the first recording. a link to the Series Landing Page is given as

Link to the Series Landing Page

This is the landing page for the previous session (“Introduction to Notebooks”)

What is the correct landing page ?

Here is the link to the Differential Equations series: https://www.bigmarker.com/series/daily-study-group-intro-to-differential-equations/series_details

3 Likes

I notice for the form y’(x)=f(x,y(x))

we can use VectorPlot[{1,rhs}…] as direction field, how to derive this? thanks,

ok, the first list is slope, got it,

Hi

I am trying to resolve this trivial problem trying to verify a solution . In the first run I get the incorrect answer but in the second run if I substitute the solution directly into the 4th line I get the correct answer . Any suggestions ?

1 Like

Function does not evaluate its second argument automatically, so you could use Evaluate as shown below to achieve the desired result in the first case:

In[1]:= sol = DSolveValue[p''[x] + 2 p'[x] - 3 p[x] == 0, p[x], x]

Out[1]= E^(-3 x) C[1] + E^x C[2]

In[2]:= solution = sol /. {C[1] -> 1, C[2] -> 0}

Out[2]= E^(-3 x)

In[3]:= verify = 
 p''[x] + 2 p'[x] - 3 p[x] == 
   0 /. {p -> Function[{x}, Evaluate[solution]]}

Out[3]= True

3 Likes

Where are the mathematica notebooks for the sessions stored?

A link to the download folder containing all the lecture notebooks (as well as any additional materials used during the sessions) is included in the reminder email you receive from BigMarker. It will also be shared in the live session everyday of the study group series.

2 Likes

Thank you very much!

Thank you. I wonder which is a better way to avoid a naming conflict: localizing p[x] using , say, Module, or by using

/. {p -> Function[{x}, Evaluate[solution]]}

Could you please provide an alternative example?
Thanks.
M

Thank you, Devendra. When you said “Function does not evaluate its second argument automatically” was it a general statement, or one related to a particular example? What would the “second argument” mean in general?
M

Thanks, Vincent. Could you please explain what’s the meaning of “1” in the list. Is it the module (length) of the vector which is, in fact, variable (but this is apparently handled by color coding) or something else? The lecture said that the “1” is D[x,x] , but why are we taking this derivative?

Thank you.

Yes, I also find it strange that the “Function does not evaluate its second argument automatically”. When I first ran into the problem I tried a number of alternatives and the error will occur without using “Function” . I cannot fathom the reason for Wolfram doing this …

Hello Michael,

In Function[x, body], the variable ‘x’ is the first ‘argument’ and the expression ‘body’ is the second ‘argument’.

The variable ‘x’ is effectively a ‘local’ (Module) variable inside Function and hence, as shown below, the function evaluation does not depend upon its name.

IIn[1]:= f = Function[x, x^2];

In[2]:= g = Function[a, a^2];

In[3]:= f[5]

Out[3]= 25

In[4]:= g[5]

Out[4]= 25

In[5]:= f\[x\]

Out[5]= x^2

In[6]:= g\[x\]

Out[6]= x^2

Also, technically, Function has the attribute HoldAll:

In[7]:= Attributes[Function]

Out[7]= {HoldAll, Protected}

In practice, this means that the second argument ‘body’ is not evaluated by Function, so Evaluate is required below (since ‘body’ is defined outside Function).

In[8]:= body = x^2;

In[9]:= Function[x, body][5] (*incorrect*)

Out[9]= x^2

In[10]:= Function[x, Evaluate[body]][5] (*correct*)

Out[10]= 25

Hope this helps.

4 Likes

Great! Thank you, Devendra, for opening the hood.
Also, I did not realize that “body” is the second argument. Apparently, I had in mind a function of several variables.
All the best.
M

If there is just one argument the { } can be omitted. For multiple arguments

f = Function[{x, y}, x*y];
f[3, 4]
(* 12 *)

Hello !
For some reason the GeneratedParameters function does not work for me

Could you help me ?
thank you

Is it fair to say that DSolveValue […] is simply equivalent to DSolve […] [[1,1,2]]?

From Lesson # 3, Verify a Solution: Why do we need to use Functon & Evaluate:

solution = 90 + C1 Exp[1/3 t];

verify = (p’[t] == 1/3*p[t] - 30) /. p → Function[t, Evaluate[solution]]

Why do the following two statements FAIL?

  1. verify = (p’[t] == 1/3*p[t] - 30) /. p → Function[t, solution]

OR

  1. verify = (p’[t] == 1/3*p[t] - 30) /. p → solution

OK, the first one fails, perhaps, because of the HoldAll attribute for Function. But why does the second one fail when there is no HoldAll attribute there?