Find a quadratic function that respect these 3 conditions

60 Views Asked by At

I am developing a mobile app and I don't know how to solve this math problem.
p : money
d : time in days
Find a quadratic $f(x)=ax^2+bx+c$ such that

$f(0)=s$ (where s is for "initial y")

$f(d)=p$

$f′(d)≤4f′(0)$

I did calculus 1 & 2 course and discrete math. How can I do this ? Thanks

EDITED from accepted answer

1

There are 1 best solutions below

1
On BEST ANSWER

I think you're asking this:

Find a quadratic $f(x) = ax^2 + bx + c$ such that

  1. $f(0) = s$ (where $s$ is my name for "initial y")

  2. $f(d) = Q$ (where $Q$ is my name for "y final"

  3. $f'(d) \le 4 f'(0)$

i.e., given $d, s$ and $Q$, find the values of $a,b,c$.

Item 1 tells us that $$c = s; \tag{1} $$

Item 2 tells us that $$ ad^2 + bd + c = Q; \tag{2} $$

Item 3 tells us that $$ 2ad + b \le 4 b. \tag{3} $$

Simplifying, we have \begin{align} c &= s\\ ad^2 + bd + c = Q\\ 2ad \le 3b \end{align} which reduces to \begin{align} ad^2 + bd = Q-s\\ 2ad \le 3b \end{align} Sadly, this system of equations has infinitely many solutions, so there's no single answer.

Still, let's push on. \begin{align} ad = \frac{Q-s}{d} - b\\ ad \le \frac{3}{2} b \end{align} so we need for $$ \frac{Q-s}{d} - b \le \frac32 b$$ or, simplifying slightly, for $$ \frac{Q-s}{d} \le \frac52 b $$ $$ \frac{2(Q-s)}{5d} \le b $$ So ... let's pick $$ b = \frac{2(Q-s)}{5d}. $$ So we now know $c$ and $b$, and need only find $a$, which we can do from equation 2; \begin{align} ad^2 &= Q - bd - c\\ ad^2 &= Q - \frac{2(Q-s)}{5d}d - s\\ &= Q - \frac{2(Q-s)}{5} - s\\ &= \frac{5Q - 2(Q-s) - 5s}{5}\\ &= \frac{5Q - 2Q + 2s - 5s}{5}\\ &= \frac{3Q -3s}{5}\\ &= \frac{3}{5}(Q-s)\\ a &= \frac{3}{5d^2}(Q-s). \end{align}

And that's at least one of the possible solutions.

And now re-reading, it looks as if you want $s = 0$, so we get \begin{align} a &= \frac{3Q}{5d^2}\\ b &= \frac{2Q}{5d}\\ c &= 0. \end{align}