ingeniouslyfowl

10 Reputation

2 Badges

7 years, 363 days

MaplePrimes Activity


These are questions asked by ingeniouslyfowl

work.mw

I'm having problems plotting these three functions on the same graph. I can get two of them, but as soon as I try to add the third, it throws a couple errors no matter what I do. It doesn't help that the docs are confusing. The first two functions are approximating diff(y(x),x) = -2xy(x)+1 with the Euler method (step size of 0.05 and 0.1) that I implemented using a for loop. I gather the data into an array and then plot those. That works. But once I try to set y(x) equal to a Taylor approximation, I can plot that graph but the values for the other functions are strangely absent. I've attached my work. What is wrong with my syntax and how can I plot all three functions at once?

I'm trying to numerically solve the differential equation: y' = -2xy + 1. Naturally, I come across the non-elementary integral of e^(x^2). By hand, I used a 2nd degree MacLaurin polynomial to get y = xe^(-x^2) + x^3/3e^(-x^2)+x^3/6e(-x^2). 

How do I use Maple to numerically solve this, with step sizes of h=0.1 and h=0.05 and plot them?

Page 1 of 1