Group Abstract Group Abstract

Message Boards Message Boards

9
|
3.6K Views
|
98 Replies
|
57 Total Likes
View groups...
Share
Share this post:
GROUPS:

[WSG77] Daily Study Group: Differential Equations (begins April 13)

Posted 2 months ago

Please join us in a study group devoted to differential equations that begins Monday, April 13. This study group will meet daily, Monday to Friday, over the next two weeks. We will share the excellent lesson videos from the Wolfram U course "Introduction to Differential Equations." The study group sessions will 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.

REGISTER HERE

enter image description here

POSTED BY: Luke Titus
98 Replies

FunctionExpand[] and FullSimplify[] will convert Pochhammer[] to Gamma[]. Since Gamma[1+n] equals n !, FullSimplify[] will go further if the complexity function tells FullSimplify[] that the factorial expression is less complex than the gamma expression and the argument is an integer. Note that "less complex" is a numerical measurement and not the same a "more familiar to the user."

FullSimplify[
 -(((-1)^n 2^(1 - n) C[1])/(Pochhammer[3/2, -1 + n] Pochhammer[2, -1 + n])), 
 n \[Element] Integers && n >= 0]
(*  -(((-2)^n C[1])/(2 n)!)  *)

For the following, one needs a complexity function that favors factorials to get a factorial:

FullSimplify[
 -(((-1)^n 2^(1 - n) C[1])/(Pochhammer[2, -1 + n] Pochhammer[5/2, -1 + n])), 
 n \[Element] Integers && n >= 0]  
(*  -((3 (-2)^n C[1])/Gamma[2 + 2 n])  *)

FullSimplify[
 -(((-1)^n 2^(1 - n) C[1])/(Pochhammer[2, -1 + n] Pochhammer[5/2, -1 + n])), 
 n \[Element] Integers && n >= 0, 
 ComplexityFunction -> 
     (LeafCount[#] - 3 Count[#, _Factorial, Infinity] &)]
(*  -((3 (-2)^n C[1])/(1 + 2 n)!)  *)
POSTED BY: Michael Rogers
POSTED BY: Luke Titus

Lambda is chosen just by convention. It's the symbol a lot of differential equation textbooks use. There isn't a meaning behind why Lambda is chosen, it's just the symbol that has commonly been chosen in the past so we decided to use the same symbol just to be consistent with other references.

POSTED BY: Luke Titus
POSTED BY: Michael Rogers
POSTED BY: Michael Rogers
POSTED BY: Luke Titus

Thank you. That definitely shouldn't be like that. I think x was holding a definition from a previous example that wasn't cleared. We'll get that fixed. Thank you so much for catching these errors.

POSTED BY: Luke Titus

In Lesson 24, Exercise 4 also contains a sign error. The forcing function described at the top is

UnitStep[t-2*Pi] * Sin[t] - UnitStep[t-4*Pi] * Sin[t]

With its negative sign, the second term cancels out the first term after t==4Pi. The forcing function is then just a single cycle, and the solution settles down to a constant amplitude. However, the forcing function in the solution is UnitStep[t-2Pi] * Sin[t] + UnitStep[t-4*Pi] * Sin[t]

With its plus sign, the second term reinforces the sinusoidal oscillation driving the solution, which then diverges.

The difference the sign of y'[t] makes is fascinating. With a minus sign, the solution diverges (swings wider and wider away from zero). With a plus sign, it converges to a value of 1/2.

Posted 1 month ago
POSTED BY: Updating Name

Thank you. My name is Richard Daehler-Wilking.

Richard Daehler-Wilking daehlerr@bellsouth.net

Posted 1 month ago

Question for Luke on the definition of autonomous equations. In my notes I have that you presented an example y'(t) = 5 + y(t). However this is still depending on "t", so it is not purely just depending on the dependent variable there. If you are defining an autonomous equation as y' = f(y) versus y' = f(x), that will change whether an autonomous equation is necessarily exact or not.

POSTED BY: Jason Gross
Posted 1 month ago
POSTED BY: Updating Name

Hi Richard. It looks like you did everything right. The C[1] solution appears to have a singularity at x=0, but the Bessel function has a leading order term of Sqrt[x] in its series expansion.

In[58]:= Series[BesselJ[1, 2 Sqrt[x]], {x, 0, 4}] // Normal
Out[58]= Sqrt[x] - x^(3/2)/2 + x^(5/2)/12 - x^(7/2)/144

This leading order term in the Bessel function will cancel the Sqrt[x] in the denominator which will lead to a finite expression at x=0.

In[59]:=Series[BesselJ[1, 2*Sqrt[x]]/Sqrt[x], {x, 0, 4}]//Normal
Out[59]= 1 - x/2 + x^2/12 - x^3/144 + x^4/2880
POSTED BY: Luke Titus

Hello Richard,

I'll open a ticket including your report and notebook for Luke to review. I'll follow up with you via email.

Thank you,

Christine Owens
Wolfram U Project Manager
Wolfram U

POSTED BY: Christine Owens

My result for Exercise 4 in Lesson 19 (series solutions near a singular point) seems to be more interesting than yours.

eqn = xy''[x] + 2y'[x] + y[x] == 0; soln = DSolveValue[eqn, y[x], x]; series = Collect[Series[soln, {x, 0, 5}], {C[1], C[2]}]; series1 = series /. {C[1] -> 1, C[2] -> 0};

In the attached notebook, you can see that DSolveValue[ ] returns a result in terms of BesselJ[1, 2, Sqrt[x]]/Sqrt[x]]. The series approximation after collecting terms for C[1] and C[2] does NOT include a singularity for C[1], and the plot for {C[1]->1, C[2]->0} is well behaved over [0,1]. Have I made a mistake somewhere?

Attachments:

You're welcome! I'll suggest this, too, which may sometimes be helpful:

aN2 = aN2 /. Gamma[u_] :> (u - 1)!

It will convert any Gamma[…] expression to a factorial, so you don't have to know ahead of time the exact form of the argument. For instance:

{Gamma[2 + 2 n], Gamma[n]}  /. Gamma[u_] :> (u - 1)!
(*  {(1 + 2 n)!, (-1 + n)!}  *)

P.S. (added in edit). You could also use the Pochhammer function identity:

RSolve[…] /. Pochhammer[a_, b_] :> (a + b - 1)!/(a - 1)!
POSTED BY: Michael Rogers
Posted 1 month ago

Just a practical question here - the quizzes are not timed are they? Thanks.

POSTED BY: Jason Gross

The voiceover for Lesson 18 (Euler Equations) includes an important sentence that is NOT in the written notes: "The equation can be simplified by assuming the solution is some power of x." [At time stamp 2:09 or so.] The written notes then say "Euler observed that by utilizing the power rule (x^r}' == r*x^(r-1), the differential equation could be transformed into a simpler form ..."

SUGGESTION: Include the voiceover assumption that y[x]==x^r in the written notes. It's implicit in the Wolfram Language transformation ( /.y->Function[x,x^r] ) but has no justification if one is just reading the notes.

In Lesson 17 about series solutions near an ordinary point, the first graph shows a sequence of plots converging to a limit. The last graph shows a similar collection of plots, and points out their convergence in the interval (-1, 1). I was confused at first because I expected a note about divergence.

SUGGESTION: For the last graph, also point out that as the order increases the plots move AWAY from the full solution (dotted line) rather than toward it as they did in the first graph. This illustrates divergence outside the region of convergence.

I have a similar problem with the free-response question on Quiz 4. I'll do as you suggest.

Problems 11 through 14 of Problem Set 4 entail physical equations with actual physical units. The use of physical units such as {kilograms, meters, seconds} was mentioned in the class, so I tried using pounds, inches, and seconds, (converting pounds to mass by dividing by gravitational acceleration). Mathematica allowed me to enter pretty-looking equations and initial conditions, but then did not seem to know what to do with them when I tried DSolveValue. Presumably I'm doing something wrong, but the sample problems don't help here.

SUGGESTION: Demonstrate use of physical units in one or two problem set solutions.

Posted 1 month ago

In Problem Set 4, Problem 7 says to solve an initial value problem with this differential equation:

y''[x] - y[x] == Exp[2]*x^2   (* Note the constant exponent 2 for Exp[] *)

However, the solution of the problem implicitly assumes g[x] equals Exp[x]*x^2 , where Exp[ ] has an argument of x instead of 2. I had no trouble solving the problem as stated with Exp[2], but perhaps that's a typo in the problem?

POSTED BY: Updating Name

Hi Rich. Please send your solution to wolfram-u@wolfram.com They will forward your solution along to me and I will get back to you over email.

POSTED BY: Luke Titus
Posted 1 month ago

I believe I figured out my original problem: The solution to Problem 5 refers to the Method of Undetermined Coefficients even when it is applying Variation of Parameters. Please check: Above the equation

u1=-Integrate[y2[x]Sin[x]/Wronskian[{y1[x],y2[x]},x],x]+C[1] 

do you mean to say "Method of Variation of Parameters" instead of "Method of Undetermined Coefficients"?

POSTED BY: Updating Name
Posted 1 month ago

Hi Luke,

I decided to go ahead and work the quizzes for the certification, and on the second quiz regarding whether all autonomous eqtns are exact (the last question), my answer was marked as incorrect, whereas I am confident that it was correct. Is there some way that it can be reviewed by a person instead of AI so that proper credit can be given?

Thanks!

POSTED BY: Rich Albert

COMMENT on END-OF-COURSE SURVEY: You ask us to indicate all the Daily Study Groups we'd be interested in, but the radio buttons only allow a single choice. SUGGESTION: Change the reply function to checkboxes.

I"m trying to work Problem 5 in Problem Session 4:

Find a general solution for the following equation using Variation of Parameters: y''(x)-6y'(x)+9y(x)=sin(x)

Compare with the particular solution obtained by the Method of Undetermined Coefficients. ==> The solution goes into great detail presenting the method of undetermined coefficients. It then finishes with "It can be observed that this is equal to the particular solution derived from Variation of Parameters." However, I can't see where variation of parameters was used.

To form an augmented matrix from matrix A and vector b, it's important to realize that the augmented matrix uses b as a COLUMN vector. If b is a single-level list, that amounts to a row vector (in spite of what some Mathematica documentation says), so we must transpose it. Transpose[ ] works with matrices (multi-level lists) but not with row vectors (single-level lists). Assume A is {{1,2,3},{4,5,6}} and b is {x,y}. To transpose b we must first enclose it in curly braces to form a two-level list. We then direct the Join[ ...] function to act at level 2 of the lists, instead of level 1.

Augmented matrix:: Join[A,Transpose[ { b } ], 2]

Output: {{1, 2, 3, x}, {4, 5, 6, y}}

In both Lesson 24 (Discontinuous Forcing Functions) and Lesson 25 (Impulse Functions), plots are shown of the complementary solution (forcing function is zero) and the particular solution (forcing function/impulse function applied). It would be interesting to see a plot of the DIFFERENCE between results with/without forcing function.

In Lesson 24, there's not much to see. However, the difference plot of (sln2 - sln3) in Lesson 25 makes it easier to see the effects of the applied impulse functions, particular the first negative hit at t==2Pi. It's harder to see the effect of the positive hit at t==3Pi because it simply adds to the already-positive motion of the curve. SUGGESTION: Create a Manipulate box to allow the student to tinker with the timing and magnitude of the second hit. That should provide a nice feeling for coherent and destructive effects.

Hello Richard,

An update has been made per your feedback. Please delete the related saved file from your cloud storage to see the updated version. https://www.wolframcloud.com/browse#Home/Copied%20Files

Thank you,
Christine Owens
Wolfram U Project Manager
Wolfram U

POSTED BY: Christine Owens

Yes, you are absolutely right. It should be Integrate[ ( 0 + s^2) ^2, {s, 0, t}]. Thank you for pointing this out. We'll get it fixed.

POSTED BY: Luke Titus

I think there's a significant typo in the solution to Problem 11 of Problem Set 2. The problem is to plot the first four iterations of Picard's method for this initial value problem:

y'[t] == (t^2 + y[t]^2 )^2      and      y[0] == 0

The published solution starts out with

y1 = Integrate[0 + s^2, {s, 0, t}]

This omits the outer exponent of the original equation. Shouldn't it be

y1 = Integrate[ ( 0 + s^2) ^2, {s, 0, t}]

That can't be controlled from within DSolveValue, but you can use the TrigToExp function to do that conversion. For example:

In[1]:= TrigToExp[DSolveValue[y''[x] + y[x] == x, y[x], x]]
Out[1]= x + 1/2 E^(-I x) C[1] + 1/2 E^(I x) C[1] + 1/2 I E^(-I x) C[2] - 1/2 I E^(I x) C[2]
POSTED BY: Luke Titus

Thank you very much. It does look like the solution for those two exercises have been switched. We'll have to fix that. Thank you for pointing that out. We really appreciate it.

POSTED BY: Luke Titus

Picard's Theorem works best when the initial condition when the dependent variable equals zero when the independent variable equals zero. Exercise 3 shows how to transform a differential equation where y[0] is not equal to zero into an equivalent problem where the initial condition at zero equals zero.

POSTED BY: Luke Titus

Someone from the WolframU team will reach out to you shortly.

POSTED BY: Luke Titus

Thank you for pointing that out. The Integrate code shouldn't be there. In place of the Integrate code should be

m = 2 x - y;
n = 2 y - x;

We'll get that fixed. Thanks again for pointing that out.

POSTED BY: Luke Titus
POSTED BY: Luke Titus
POSTED BY: Luke Titus
POSTED BY: Luke Titus

Thank you very much for your comments, Richard. Yes, the main focus of this course is the learn the math and theory behind differential equations while using the Wolfram Language simply as a tool to do some of the work. I appreciate your comment about how we should show more of the intermediate steps and explicitly show what is being integrated before doing the integration. We will take this into account when making future improvements to this course.

POSTED BY: Luke Titus
POSTED BY: Michael Rogers
Posted 1 month ago

Thanks, I do recognize your point about y being the same as y(t) where t is the independent variable. I was approaching that aspect incorrectly.

I will say, going back to the other issue about exactness, I did provide an answer to the question on the quiz regarding whether all autonomous equations are exact that was nuanced as it took into account the different forms in which the equation could be expressed which determines whether the equation is exact and it marked it as incorrect. So for that I will need the teacher's input because I don't know if the form of the equation is being deemed as relevant - although I am not sure how it wouldn't be.

POSTED BY: Jason Gross
Posted 1 month ago

Michael, I have reservations about that first equation being autonomous because y is being set as a function of t which is the independent variable. For example population growth as a function of population would be clearly autonomous but population growth as a function of population set as a function of time has a somewhat different relationship wouldn't it? In his definition, Luke says that the independent variable cannot be in the equation when you have the autonomous property.

I agree with your other calculations on exactness for the other equations except that when setting the equation on the left hand side to 0, I have negative signs for the "N" terms, -1/f(y) in the first , and -1 for the second.

POSTED BY: Jason Gross

Thanks for pointing that out, Richard. We'll get that fixed.

POSTED BY: Luke Titus

You're absolutely right. Thank you very much for pointing this out. We'll get that fixed.

POSTED BY: Luke Titus

In those examples the phi(r) function is meant to represent any function of r, not just the unit step function.

POSTED BY: Luke Titus
Posted 1 month ago

@Michael Rogers, But so basically what you have written confirms my conclusion that he made an error in saying that first equation I listed is autonomous, just as f'(y) = f(x) is also not autonomous, unless it is a constant which is not a general condition and he didn't say that. His definition will falsely lead someone to infer that all autonomous equations are exact.

POSTED BY: Jason Gross
POSTED BY: Michael Rogers

There is something odd about Lesson 27 (Review of Matrices) as it appears in the course framework. In the section "Matrix Functions", the code snippet

A={{x^2, x},{3 + x}, Exp[x]}};
A // MatrixForm

is followed by (apparently output) matrix

{{{r^2, s^2}, {r, s}}, {{r + 3, s + 3}, {Exp[r], Exp[s]}}}  (* Completely different matrix *)

When I open the downloaded lesson in Mathematica, I see the input as shown, but the output is the matrix corresponding to the input with the variable x, not the more complicated matrix with r and s as I see in the course framework..

In Problem Session 7, the discussion of Problem 2 says "Because of the lack of a damping term, the solution takes an unending oscillatory path:"

In fact, the equation for this problem (y''[t] + 2*y'[t] + y[t] == (a few step functions) ) DOES have a damping term and the plotted solution tapers off quickly.

Hello Richard,

Thank you for this feedback. I'll create a ticket per your report for Luke to review.

Christine Owens

POSTED BY: Christine Owens

Hello Richard,

I'll open a ticket including your report and notebook for Luke to review. I'll follow up with you via email.

Thank you,

Christine Owens
Wolfram U Project Manager
Wolfram U

POSTED BY: Christine Owens

Hello Jason,

I'll inquire about this with Luke.

Thank you,

Christine Owens
Wolfram U Project Manager
Wolfram U

POSTED BY: Christine Owens

Thank you Richard. I've noted this for Luke to review.

POSTED BY: Christine Owens

Ahh OK! I thought that might've been you :-) Thank you for confirming.

POSTED BY: Christine Owens

Hello,

Thank you for bringing this to our attention. Can you please confirm your name? I'll follow up with you via email once this has been reviewed and updated.

Best,
Christine Owens
Wolfram U Project Manager
Wolfram U

POSTED BY: Christine Owens

Cool! Thank you. SUGGESTION: Add this to the discussion of Example 4 in Lesson 19. It seems to be a nice example of an apparent singularity that isn't "essential"; that is, it goes away when you look at it right.

Thank you very much for all of your comments, Richard. I really do appreciate it. We've put a lot of work into this course and we want to make it the best course we can. Your comments have helped us a lot with identifying some of the errors or improvements that we've overlooked.

POSTED BY: Luke Titus

Sorry to submit so many questions -- but not really. They come up because the course is so rewarding and has so much potential. Thanks for the challenge!

In Lesson 19 (Series Solutions near a Singular Point), Example 2, I'm able to duplicate everything up until the solution to the recursion relations (notebook attached). When I try to use RSolve[ ], I get expressions involving Pochhammer[...], which I've never heard of before. Wolfram documentation for Pochhammer indicates it should reduce to ratios of factorials if it is given integer arguments, but the solutions I come up with all involve a fraction.

QUESTION: When RSolve[ ] gives us Pochhammer, is there anything we can do to simplify it? Or is there something in particular we should look for to fix it?

Attachments:

Hello Richard,

Thank you for this feedback. I'll create a ticket per your report for Luke to review.

Christine Owens Wolfram U Project Manager Wolfram U

POSTED BY: Christine Owens

Hello Jason,

No, the quizzes are not timed. There is a deadline to pass all quizzes in the framework to earn the Completion certification for Daily Study Group: Introduction to Differential Equations, which is May 8.

Otherwise, you can earn Completion within the course framework.

Christine Owens Wolfram U Project Manager Wolfram U

POSTED BY: Christine Owens

Hello Richard,

Thank you for this feedback. I'll create a ticket per your report for Luke to review.

Christine Owens Wolfram U Project Manager Wolfram U

POSTED BY: Christine Owens

That's a good point. Thanks for the suggestion, Richard. We'll update the notebooks to reflect that.

POSTED BY: Luke Titus

Thanks, Richard. That's a good suggestion. We can include units in a few of those problems to show how to include units in a calculation.

POSTED BY: Luke Titus

Thank you very much. It does look like it should be Exp[x] rather than Exp[2]. We'll get that fixed.

POSTED BY: Luke Titus

Hello Richard,

I've added your follow-up to our original ticket per your report above for "problem 5, problem session 4".

Thank you,

Christine

POSTED BY: Christine Owens

Thanks for pointing that out, Richard. We'll get that fixed.

POSTED BY: Luke Titus

Oops! Thanks for sharing this error in the survey question. We will fix it.

POSTED BY: Jamie Peterson

Hello Richard,

I've created a ticket per your inquiry for review.

Christine Owens
Wolfram U Project Manager
Wolfram U

POSTED BY: Christine Owens

Thank you, Richard. It looks like that is doing the right thing.

POSTED BY: Luke Titus

Thank you very much for your comments, Richard. Sorry that I couldn't give a better reply during the session today, but posting these comments here helps us keep track of everything that needs to be improved in the course.

POSTED BY: Luke Titus

Hello Richard,

Thank you for your feedback. I've created a ticket per your report for Luke and our team to review. As soon as I have more information, I'll let you know.

Best,
Christine Owens
Wolfram U Project Manager
Wolfram U

POSTED BY: Christine Owens

In the Basic Example of Lesson 13 (Method of Undetermined Coefficients) , DSolveValue returns a solution in terms of Cos[x] and Sin[x]. QUESTION: Is it possible to specify which basis functions DSolveValue uses? That is, can we ask DSolveValue to return an answer in terms of

Exp[x] and Exp[-x]?

I have notice between the Exercise 11-1 and Exrcise 12-1. They are changed.

enter image description hereenter image description here

POSTED BY: Jaime Jiménez

THANK YOU. I really appreciate your taking the trouble to address my difficulty. MY REAL PROBLEM may simply be impatience. I just now tried the e-mailed link again, and this time the screen says "The webinar will begin momentarily ..." Apparently it doesn't work if you try it too soon.

Posted 2 months ago

Richard, it sounds like you have an issue logging into the BigMarker servers. The link Cassidy sends out every day contains your BigMarker credentials: they're embedded in the long list of characters in that URL. Cassidy should be able to reset and re-send to you. An email to wolfram-u@wolfram.com should get the ball rolling.

As a temporary workaround, I bet you could "register" with another e-mail address and use that to access the session today. Wolfram U would prefer to fix your permanent account (since that's how they track users for certifications they earn), but that can get you running today.

Good luck. This course is hard enough for me with my BigMarker login working smoothly. :)

POSTED BY: Phil Earnhardt

No, I'm NOT looking for a link to the recording. Cassidy has been sending those out each day. What I'm looking for is a link to the presentation ABOUT TO BE PRESENTED -- in other words, the live class session. For example, I just received the reminder for today's course session. It has a link [Join Daily Study Group] and immediately below that another link headed by "Join using your custom link:"

Both links take me to to a page describing the webinar, with a graphic that sometimes contains an arrowhead that lets me into the course and sometimes does not. Yesterday it did not. Today it does not. I have dialed into the session (Dial-In Number 176487# and Passcode 8751#) and am now listening to some very nice hold music ...

Thanks, but that link goes to the course framework with the recording of the course. I'm looking for a link to the daily lectures as they are given. Sometimes the link in the daily reminder e-mail works, but at least once or twice it did not seem to work for me.

In Lesson 7 / Exercises, the solution to Exercise 1 seems to be a non sequitur. The equation is

2*x - y[x] + y'[x]*(2*y[x] - x) == 0

The solution says "The functions N(x,y(x)) and M(x,y(x)) can be identified from the differential equation:"

y1=Integrate[(-s+0),{s,0,x}]
Posted 2 months ago

In Section 12 of the course, the symbol Lambda was used for the characteristic equation. Can you explain why that particular symbol was used there? It seems that choice was no accident, but I see no clues to why that was chosen. TY.

POSTED BY: Phil Earnhardt

REQUEST: Can you please post a URL for the daily study group sessions? Everything I try just takes me to the registration page. It has dial-in information that doesn't work (no Dial-In ID Number), and I can't find a link to the session that has surely started by now.

I'm trying to generate nice legends like the ones in the Autonomous Equations section of Lesson 6:

C[1] = -2  C[1] = -1  C[1] = 0  C[1] = 1  C[1] = 2 

I tried Table["C[1] = "j, {j, -2, 2}] but this generated

-2 C[1] =
-C[1] = 
0
C[1] =
2 C[1] =

In other words, Mathematica did math instead of lexical substitution!
QUESTION: Is there an analog of the C language sprintf function by which we can generate formatted expressions?

The issue here is that the form of y[x] in the definition of soln2 isn't in the right form to make the replacement. This variable has the definition:

soln2={{y[x]->(b+E^(-a x+Subscript[\[ConstantC], 1]))/a}}

When making the substitution into the equation, you first need to extract just the functional form for the solution rather than the entire rule. For example:

In[24]:= soln2[[1, 1, 2]]
Out[24]= (b + E^(-a x + C[1]))/a

This form can be substituted into the equation to verify it is true.

In[25]:= (y'[x] + a*y[x] == b) /. y -> Function[x, Evaluate[soln2[[1, 1, 2]]]]
Out[25]= True

For your second question. There isn't an easy way to automatically redefine the constant term in the exponential as another constant. If the equation was in a simpler form, you could use a replacement rule such as:

In[26]:= a*Exp[C[1]] /. Exp[C[1]] -> C[2]
Out[26]= a C[2]

However, since the -a*x term is also in the exponential, more complicated pattern matching that wouldn't be general for all situations would be required pick out just the Exp[C[1]] term. In these cases it's normally easier to just redefine the arbitrary constants manually.

POSTED BY: Luke Titus

Something seems odd in the "Integrating Factor Method" section of Lesson 5 (Linear 1st-Order Eqns). The input

D[Exp[f[x]],x] 

generates Exp[f[x]] f'[x] on my system, as expected. However, in the lesson notebook it generates output with an exponent that seems to be a detailed list of possibilities. Pasting it into this box gives an unholy mess, but the first set of possibilities seems to be

1 if 0 <= x < 1 and
0 otherwise

and the second set of possibilities looks like

0 if x is not equal to zero or one;
Indeterminate otherwise

My guess is that the function f is carrying a definition over from a previous cell. SUGGESTION: clear the contents of f before calling D[Exp[f[x]],x]

In Lesson 5 (Linear 1st Order Eqns), the example for constant coefficients shows a manual reworking of the solution to bring the arbitrary constant C out of the exponential function, then uses that manually reworked expression as a replacement for y when checking the solution:

y->Function[x,(b+\[ConstantC] Exp[-a x])/a]

When I tried simply replacing y with the generated solution

[In]    soln2 = Solve[soln, y[x], Reals]

    (y'[x] + a*y[x] == b) /. y -> Function[x, Evaluate[soln2]] // Simplify

[Out]    {{y[x] -> (b + E^(-a x + C[1]))/a}}

the result would not simplify to True. It doesn't perform the indicated replacements:

[In]    (y'[x] + a*y[x] == b) /. y -> Function[x, Evaluate[soln2]] // Simplify

[Out]    
{{a (y[x] -> (b + E^(-a x + C[1]))/a) + (Derivative[1][y][x] -> -E^(-a x + C[1]))}} == b

QUESTION #1: Why won't it simplify?

QUESTION #2: Is there a way to have Mathematica do the work, rather than having to rework the solution manually?

You can get different sized arrows using VectorScaling and VectorSizes. For example:

VectorPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}, VectorScaling -> Automatic, VectorSizes -> {0, 1}]

The advantage of using all vectors with a unit length and specifying the magnitudes with colors is to make the plot less cluttered when vector lengths differ a lot in the plot. When using the default unit lengths for the vectors, you can get a legend that shows the length that corresponds to a particular color using PlotLegends

VectorPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}, PlotLegends -> Automatic]
POSTED BY: Luke Titus
Posted 2 months ago

When first studying differential equations, I seem to recall we were drawing magnitudes with the vectors in the direction field. Or maybe my memory is not accurage. I mostly recall they were a pain to draw manually -- much work. :( Is there any advantage to drawing magnitudes with the vector fields, or has everyone agreed that having unit magnitude vectors is the way to go?

Does VectorPlot[] allow one to draw vector fields with something other than a unit magnitude? Have you ever encountered an application where that was useful?

POSTED BY: Phil Earnhardt
Posted 2 months ago

enter image description here

Can r be i?

POSTED BY: Tingting Zhao

Regarding Lesson 3 and the associated Problem 5: At first I was baffled why the instructor did so much work to come up with a solution that he then verified using DSolveValue[...]. Why not simply use DSolveValue[...] to begin with, as was done in the recent course on Partial Differential Equations. Then I realized that this instructor is actually teaching us math, not simply Wolfram Language functions!
SUGGESTION (in terms of Problem 5 of Problem Session 1, but can be applied to the population model in Lesson 3 as well): After the text "Move dx to the right-hand side and use Integrate on the left-hand side", show the result of moving dx to the right-hand side BEFORE integrating:
(1 / {f(x) + 1)) df(x) = 1 * dx
NOW point out that we have separated variables and can integrate each side separately. (The instructor said this, but we didn't have this form of the equation to look at, so I missed his point.)

This is just a reminder that the Differential Equations Study Group begins tomorrow (Monday, April 13).

The Study Group will offer an excellent opportunity to get certified in Differential Equations with guidance from our popular instructor, Luke Titus.

I look forward to seeing you all!

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